ffmpeg | branch: release/2.8 | Michael Niedermayer <mich...@niedermayer.cc> | 
Thu May 28 14:33:58 2020 +0200| [6b58eaac4ddc36d46bb4611efede18f0a9a530d1] | 
committer: Michael Niedermayer

avcodec/h264dec: Disable forced small_padding on flag2 fast

Fixes: 
20978/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-5746381832847360

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>

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

 libavcodec/h264.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 4fc2aed302..1f399ab838 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -293,12 +293,9 @@ const uint8_t *ff_h264_decode_nal(H264Context *h, 
H264SliceContext *sl,
     if(i>=length-1){ //no escaped 0
         *dst_length= length;
         *consumed= length+1; //+1 for the header
-        if(h->avctx->flags2 & AV_CODEC_FLAG2_FAST){
-            return src;
-        }else{
-            memcpy(dst, src, length);
-            return dst;
-        }
+
+        memcpy(dst, src, length);
+        return dst;
     }
 
     memcpy(dst, src, i);

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

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to