[FFmpeg-cvslog] r14274 - trunk/libavformat/mpegts.c
mru
subversion
Fri Jul 18 03:07:18 CEST 2008
Author: mru
Date: Fri Jul 18 03:07:17 2008
New Revision: 14274
Log:
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).
Modified:
trunk/libavformat/mpegts.c
Modified: trunk/libavformat/mpegts.c
==============================================================================
--- trunk/libavformat/mpegts.c (original)
+++ trunk/libavformat/mpegts.c Fri Jul 18 03:07:17 2008
@@ -347,8 +347,8 @@ static int analyze(const uint8_t *buf, i
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];
More information about the ffmpeg-cvslog
mailing list