[FFmpeg-cvslog] mpegts_get_pcr: dont loose a packet when resyncing

Michael Niedermayer git at videolan.org
Sun Aug 18 23:28:49 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Aug 18 22:31:19 2013 +0200| [b4429c259a64b46357165e4eafaead175be44760] | committer: Michael Niedermayer

mpegts_get_pcr: dont loose a packet when resyncing

This matches how read_packet() works

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b4429c259a64b46357165e4eafaead175be44760
---

 libavformat/mpegts.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 9cff528..db564b3 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);



More information about the ffmpeg-cvslog mailing list