summaryrefslogtreecommitdiff
path: root/libavformat/h264dec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/h264dec.c')
-rw-r--r--libavformat/h264dec.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/libavformat/h264dec.c b/libavformat/h264dec.c
index 6fd45c1336..d1d37ca88a 100644
--- a/libavformat/h264dec.c
+++ b/libavformat/h264dec.c
@@ -2,25 +2,26 @@
* RAW H.264 video demuxer
* Copyright (c) 2008 Michael Niedermayer <michaelni@gmx.at>
*
- * This file is part of Libav.
+ * This file is part of FFmpeg.
*
- * Libav is free software; you can redistribute it and/or
+ * FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * Libav is distributed in the hope that it will be useful,
+ * FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with Libav; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#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