]> git.sesse.net Git - ffmpeg/commit
mpegts: relax restrictions on matching the packet start in read_header
authorAnton Khirnov <anton@khirnov.net>
Wed, 4 Feb 2015 11:37:01 +0000 (12:37 +0100)
committerAnton Khirnov <anton@khirnov.net>
Tue, 10 Feb 2015 20:43:44 +0000 (21:43 +0100)
commit1509c018bd5b054a2354e20021ccbac9c934d213
tree3fd78def01951d1a4bb81cb5d062beacc2378cb2
parent6a5b8ca4329039fad44ad50b6496948f4bfacb4c
mpegts: relax restrictions on matching the packet start in read_header

analyze() is currently called both when probing and from read_header().
It determines the packet start by looking for the sync byte, followed by
unset Transport Error Indicator and valid adaptation_field_control.

This makes sense to do when probing, but once we already know the format
is MPEG-TS, it is counterproductive to be so strict -- e.g. in some
files the TEI might be set and analyze() might get called with a smaller
buffer than the one used for probing, resulting in a failure.
libavformat/mpegts.c