mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
mpegts: Attempt to seek back to beginning in non-seekable mpegts files.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
3c8862a567
commit
1fb30586cf
@ -1563,7 +1563,10 @@ static int mpegts_read_header(AVFormatContext *s,
|
|||||||
/* normal demux */
|
/* normal demux */
|
||||||
|
|
||||||
/* first do a scaning to get all the services */
|
/* first do a scaning to get all the services */
|
||||||
if (pb->seekable && avio_seek(pb, pos, SEEK_SET) < 0)
|
/* NOTE: We attempt to seek on non-seekable files as well, as the
|
||||||
|
* probe buffer usually is big enough. Only warn if the seek failed
|
||||||
|
* on files where the seek should work. */
|
||||||
|
if (avio_seek(pb, pos, SEEK_SET) < 0)
|
||||||
av_log(s, AV_LOG_ERROR, "Unable to seek back to the start\n");
|
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);
|
mpegts_open_section_filter(ts, SDT_PID, sdt_cb, ts, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user