OSDN Git Service

avio: Don't set the seekable flag if no seek function is provided
authorHendrik Schreiber <hs@tagtraum.com>
Tue, 23 Jul 2013 09:25:34 +0000 (11:25 +0200)
committerMartin Storsjö <martin@martin.st>
Fri, 26 Jul 2013 18:46:18 +0000 (21:46 +0300)
Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/aviobuf.c

index d2eaf36..bc89768 100644 (file)
@@ -90,7 +90,7 @@ int ffio_init_context(AVIOContext *s,
     s->must_flush      = 0;
     s->eof_reached     = 0;
     s->error           = 0;
-    s->seekable        = AVIO_SEEKABLE_NORMAL;
+    s->seekable        = seek ? AVIO_SEEKABLE_NORMAL : 0;
     s->max_packet_size = 0;
     s->update_checksum = NULL;