summaryrefslogtreecommitdiffstats
path: root/libavformat/h264dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-05-30 03:53:32 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-05-30 03:53:32 +0200
commitdae89802a6eeae89519334d78cf2a79da4060273 (patch)
treedbefd4b855c6cae278828fc2a8bf747675420eae /libavformat/h264dec.c
parent2e15f07cfddd0bfdc049d94c68b0198d086956b7 (diff)
downloadffmpeg-streaming-dae89802a6eeae89519334d78cf2a79da4060273.zip
ffmpeg-streaming-dae89802a6eeae89519334d78cf2a79da4060273.tar.gz
avformat/h264dec: Fix detection of invalid h264 with 0x100 startcodes
Fies Ticket4325 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/h264dec.c')
-rw-r--r--libavformat/h264dec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/h264dec.c b/libavformat/h264dec.c
index 76073dd..4adc234 100644
--- a/libavformat/h264dec.c
+++ b/libavformat/h264dec.c
@@ -47,8 +47,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:
OpenPOWER on IntegriCloud