diff options
-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; } |