]> git.sesse.net Git - ffmpeg/commitdiff
lavc/mediacodecdec_h264: move bsf variable declaration at the top of the function
authorMatthieu Bouron <matthieu.bouron@stupeflix.com>
Mon, 5 Sep 2016 13:38:13 +0000 (15:38 +0200)
committerMatthieu Bouron <matthieu.bouron@stupeflix.com>
Wed, 7 Sep 2016 19:04:13 +0000 (21:04 +0200)
libavcodec/mediacodecdec_h264.c

index 96e2a8af0425aefc4a603baea8763fa4ddc041ee..9350a32d1bd24d1db2c76fd06a019138838971f3 100644 (file)
@@ -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;