[FFmpeg-cvslog] avcodec/h264dec: remove unnecessary checks in h264_decode_frame

Zhao Zhili git at videolan.org
Fri Sep 7 21:36:59 EEST 2018


ffmpeg | branch: master | Zhao Zhili <quinkblack at foxmail.com> | Thu Sep  6 17:01:49 2018 +0800| [037b3bd14a8d6ffe4cecd0875bfb021b6edfc2a4] | committer: Michael Niedermayer

avcodec/h264dec: remove unnecessary checks in h264_decode_frame

These conditions are checked again in is_extra(). This patch makes no
functional changes.

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavcodec/h264dec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index 1f44ed18d9..7b4c5c76ea 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -986,7 +986,7 @@ static int h264_decode_frame(AVCodecContext *avctx, void *data,
                                      &h->ps, &h->is_avc, &h->nal_length_size,
                                      avctx->err_recognition, avctx);
     }
-    if(h->is_avc && buf_size >= 9 && buf[0]==1 && buf[2]==0 && (buf[4]&0xFC)==0xFC && (buf[5]&0x1F) && buf[8]==0x67){
+    if (h->is_avc && buf_size >= 9 && buf[0]==1 && buf[2]==0 && (buf[4]&0xFC)==0xFC) {
         if (is_extra(buf, buf_size))
             return ff_h264_decode_extradata(buf, buf_size,
                                             &h->ps, &h->is_avc, &h->nal_length_size,



More information about the ffmpeg-cvslog mailing list