Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Vignali <martin.vignali@gmail.com>2018-11-18 01:33:12 +0300
committerMartin Vignali <martin.vignali@gmail.com>2018-12-02 14:55:20 +0300
commita970920026010bd9e03f99017c305212b889d4a5 (patch)
treeb7c506e95da8b2b49099a77603fc0efe1e57eee1 /libavcodec/proresdec2.c
parentdae9b4b8a4d9aee62a9fbb944da40b08ff442365 (diff)
avcodec/proresdec : move dsp init after codec tag check
Diffstat (limited to 'libavcodec/proresdec2.c')
-rw-r--r--libavcodec/proresdec2.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/libavcodec/proresdec2.c b/libavcodec/proresdec2.c
index 130a4e3fe8..835df19418 100644
--- a/libavcodec/proresdec2.c
+++ b/libavcodec/proresdec2.c
@@ -53,15 +53,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
avctx->bits_per_raw_sample = 10;
- ff_blockdsp_init(&ctx->bdsp, avctx);
- ff_proresdsp_init(&ctx->prodsp, avctx);
-
- ff_init_scantable_permutation(idct_permutation,
- ctx->prodsp.idct_permutation_type);
-
- permute(ctx->progressive_scan, ff_prores_progressive_scan, idct_permutation);
- permute(ctx->interlaced_scan, ff_prores_interlaced_scan, idct_permutation);
-
switch (avctx->codec_tag) {
case MKTAG('a','p','c','o'):
avctx->profile = FF_PROFILE_PRORES_PROXY;
@@ -86,6 +77,15 @@ static av_cold int decode_init(AVCodecContext *avctx)
av_log(avctx, AV_LOG_WARNING, "Unknown prores profile %d\n", avctx->codec_tag);
}
+ ff_blockdsp_init(&ctx->bdsp, avctx);
+ ff_proresdsp_init(&ctx->prodsp, avctx);
+
+ ff_init_scantable_permutation(idct_permutation,
+ ctx->prodsp.idct_permutation_type);
+
+ permute(ctx->progressive_scan, ff_prores_progressive_scan, idct_permutation);
+ permute(ctx->interlaced_scan, ff_prores_interlaced_scan, idct_permutation);
+
return 0;
}