diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-08-18 22:31:19 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-08-18 22:48:19 +0200 |
commit | b4429c259a64b46357165e4eafaead175be44760 (patch) | |
tree | ac9c2529137e015fb8e74567a478edfef354c7c8 /libavformat/mpegts.c | |
parent | 0f2f65bd583576ef8c12eea6088c84d4468f5804 (diff) | |
download | ffmpeg-b4429c259a64b46357165e4eafaead175be44760.tar.gz |
mpegts_get_pcr: dont loose a packet when resyncing
This matches how read_packet() works
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mpegts.c')
-rw-r--r-- | libavformat/mpegts.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 9cff528dd3..db564b3d9b 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -2324,6 +2324,7 @@ static av_unused int64_t mpegts_get_pcr(AVFormatContext *s, int stream_index, if (avio_read(s->pb, buf, TS_PACKET_SIZE) != TS_PACKET_SIZE) return AV_NOPTS_VALUE; if (buf[0] != 0x47) { + avio_seek(s->pb, -TS_PACKET_SIZE, SEEK_CUR); if (mpegts_resync(s) < 0) return AV_NOPTS_VALUE; pos = avio_tell(s->pb); |