asfdec: Fix reading from the pipe
authorAlexandra Hájková <alexandra.khirnova@gmail.com>
Fri, 10 Jul 2015 10:39:58 +0000 (12:39 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Fri, 10 Jul 2015 11:25:02 +0000 (13:25 +0200)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavformat/asfdec.c

index 9989b80..01d753f 100644 (file)
@@ -922,7 +922,8 @@ static int asf_read_data(AVFormatContext *s, const GUIDParseTable *g)
                size, asf->nb_packets);
     avio_skip(pb, 2); // skip reserved field
     asf->first_packet_offset = avio_tell(pb);
-    align_position(pb, asf->offset, asf->data_size);
+    if (pb->seekable)
+        align_position(pb, asf->offset, asf->data_size);
 
     return 0;
 }