diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index e9b984dc11..410507db6d 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1488,7 +1488,7 @@ static int mpegts_read_header(AVFormatContext *s, /* normal demux */ /* first do a scaning to get all the services */ - if (avio_seek(pb, pos, SEEK_SET) < 0) + if (pb->seekable && avio_seek(pb, pos, SEEK_SET) < 0) av_log(s, AV_LOG_ERROR, "Unable to seek back to the start\n"); mpegts_open_section_filter(ts, SDT_PID, sdt_cb, ts, 1);