X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fh264dec.c;h=d1d37ca88aa20c7459aa7f267b435b2cddcc5a94;hb=108b738db1fd86806374874649aab9c79ed3bee0;hp=76073dda785f7fa074a25ac97c0816c72a1de11b;hpb=e2f3ea1cbb64e64c9ea59a56b2ee00a6e64f4de0;p=ffmpeg diff --git a/libavformat/h264dec.c b/libavformat/h264dec.c index 76073dda785..d1d37ca88aa 100644 --- a/libavformat/h264dec.c +++ b/libavformat/h264dec.c @@ -21,6 +21,7 @@ #include "avformat.h" #include "rawdec.h" +#include "libavcodec/internal.h" static int h264_probe(AVProbeData *p) { @@ -47,8 +48,10 @@ static int h264_probe(AVProbeData *p) return 0; if (ref_zero[type] == -1 && !ref_idc) return 0; - if (ref_zero[type] == 2) - res++; + if (ref_zero[type] == 2) { + if (!(code == 0x100 && !p->buf[i + 1] && !p->buf[i + 2])) + res++; + } switch (type) { case 1: @@ -68,6 +71,7 @@ static int h264_probe(AVProbeData *p) } } } + ff_tlog(NULL, "sps:%d pps:%d idr:%d sli:%d res:%d\n", sps, pps, idr, sli, res); if (sps && pps && (idr || sli > 3) && res < (sps + pps + idr)) return AVPROBE_SCORE_EXTENSION + 1; // 1 more than .mpg