Commit 4c4db7af authored by mru's avatar mru

MPEGTS: Improve probe function

When a sync byte is found, check that transport_error_indicator is zero,
and adaptation_field_control is valid (non-zero).

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14274 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent b20e959e
......@@ -347,8 +347,8 @@ static int analyze(const uint8_t *buf, int size, int packet_size, int *index){
memset(stat, 0, packet_size*sizeof(int));
for(x=i=0; i<size; i++){
if(buf[i] == 0x47){
for(x=i=0; i<size-3; i++){
if(buf[i] == 0x47 && !(buf[i+1] & 0x80) && (buf[i+3] & 0x30)){
stat[x]++;
if(stat[x] > best_score){
best_score= stat[x];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment