aboutsummaryrefslogtreecommitdiffstats
path: root/tools/yuvcmp.c
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2020-05-20 21:44:39 +0200
committerMarton Balint <cus@passwd.hu>2020-05-27 22:36:53 +0200
commit6ec009f7e22d69502db83df49383b4a7c814ed7d (patch)
tree3a315785b9417c9ca0d4001d3c2e88d717ca9789 /tools/yuvcmp.c
parent09e6e455885c929b492e96e6e71cbc7d94d2ab1c (diff)
downloadffmpeg-6ec009f7e22d69502db83df49383b4a7c814ed7d.tar.gz
avformat/mpegts: use get_packet_size in mpegts_resync for determining raw_packet_size
The old resync logic had some bugs, for example the packet size could stuck into 192 bytes, because pos47_full was not updated for every packet, and for unseekable inputs the resync logic simply skipped some 0x47 sync bytes, therefore the calculated distance between sync bytes was a multiple of 188 bytes. AVIO only buffers a single packet (for UDP/mpegts, that usually means 1316 bytes), so for every ten consecutive 188-byte MPEGTS packets there was always a seek failure, and that caused the old code to not find the 188 byte pattern across 10 consecutive packets. This patch changes the custom logic to the one which is used when probing to determine the packet size. This was already proposed as a FIXME a long time ago...
Diffstat (limited to 'tools/yuvcmp.c')
0 files changed, 0 insertions, 0 deletions