[FFmpeg-devel] [PATCH 1/2] lavc/mediacodecdec_h264: move bsf variable declaration at the top of the function

Matthieu Bouron matthieu.bouron at gmail.com
Mon Sep 5 16:57:53 EEST 2016


From: Matthieu Bouron <matthieu.bouron at stupeflix.com>

---
 libavcodec/mediacodecdec_h264.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/mediacodecdec_h264.c b/libavcodec/mediacodecdec_h264.c
index 18f186b..9b71561 100644
--- a/libavcodec/mediacodecdec_h264.c
+++ b/libavcodec/mediacodecdec_h264.c
@@ -129,6 +129,8 @@ static av_cold int mediacodec_decode_init(AVCodecContext *avctx)
     int is_avc = 0;
     int nal_length_size = 0;
 
+    const AVBitStreamFilter *bsf = NULL;
+
     FFAMediaFormat *format = NULL;
     MediaCodecH264DecContext *s = avctx->priv_data;
 
@@ -205,7 +207,7 @@ static av_cold int mediacodec_decode_init(AVCodecContext *avctx)
         goto done;
     }
 
-    const AVBitStreamFilter *bsf = av_bsf_get_by_name("h264_mp4toannexb");
+    bsf = av_bsf_get_by_name("h264_mp4toannexb");
     if(!bsf) {
         ret = AVERROR_BSF_NOT_FOUND;
         goto done;
-- 
2.9.3



More information about the ffmpeg-devel mailing list