diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index 9989b8073c..01d753f80a 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -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; }