From c59bbe7c22103699bf77d6ffd20dbb78c48969cd Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 11 Jan 2012 00:32:16 -0800 Subject: Handle a couple of special AVSEEK_ seek modes --- examples/alffmpeg.c | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- cgit v1.2.3