diff options
author | Chris Robinson <[email protected]> | 2012-01-11 00:32:16 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-01-11 00:32:16 -0800 |
commit | c59bbe7c22103699bf77d6ffd20dbb78c48969cd (patch) | |
tree | 3e83c0ef5bd11707f35ec0a1651469b76556139d /examples | |
parent | d4670faafdf7a44392a281b57d3c6933a6bc22ad (diff) |
Handle a couple of special AVSEEK_ seek modes
Diffstat (limited to 'examples')
-rw-r--r-- | examples/alffmpeg.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/alffmpeg.c b/examples/alffmpeg.c index 424a07a6..d4d70527 100644 --- a/examples/alffmpeg.c +++ b/examples/alffmpeg.c @@ -94,6 +94,7 @@ static int64_t MemData_seek(void *opaque, int64_t offset, int whence) { struct MemData *membuf = (struct MemData*)opaque; + whence &= ~AVSEEK_FORCE; switch(whence) { case SEEK_SET: @@ -115,6 +116,9 @@ static int64_t MemData_seek(void *opaque, int64_t offset, int whence) membuf->pos = membuf->length + offset; break; + case AVSEEK_SIZE: + return membuf->length; + default: return -1; } |