ffmpeg | branch: master | Michael Niedermayer <michae...@gmx.at> | Sat May 30 
03:53:32 2015 +0200| [dae89802a6eeae89519334d78cf2a79da4060273] | committer: 
Michael Niedermayer

avformat/h264dec: Fix detection of invalid h264 with 0x100 startcodes

Fies Ticket4325

Signed-off-by: Michael Niedermayer <michae...@gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dae89802a6eeae89519334d78cf2a79da4060273
---

 libavformat/h264dec.c |    6 ++++--
 1 file 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:

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to