projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b4429c2
)
avformat/mpegts: resync from the smallest packet size on
author
Michael Niedermayer
<michaelni@gmx.at>
Sun, 18 Aug 2013 20:59:04 +0000
(22:59 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sun, 18 Aug 2013 20:59:04 +0000
(22:59 +0200)
This avoids the loss of a packet in many cases if the packet size was wrong.
It also improves detection of packet size changes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mpegts.c
patch
|
blob
|
history
diff --git
a/libavformat/mpegts.c
b/libavformat/mpegts.c
index
db564b3
..
c641794
100644
(file)
--- a/
libavformat/mpegts.c
+++ b/
libavformat/mpegts.c
@@
-1974,7
+1974,7
@@
static int read_packet(AVFormatContext *s, uint8_t *buf, int raw_packet_size, co
/* check packet sync byte */
if ((*data)[0] != 0x47) {
/* find a new packet start */
- avio_seek(pb, -
TS_PACKET_SIZE
, SEEK_CUR);
+ avio_seek(pb, -
raw_packet_size
, SEEK_CUR);
if (mpegts_resync(s) < 0)
return AVERROR(EAGAIN);
else