summaryrefslogtreecommitdiff
path: root/libavcodec/svq3.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/svq3.c')
-rw-r--r--libavcodec/svq3.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index a7e806540a..95c85fa0bb 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -819,21 +819,12 @@ static av_cold int svq3_decode_init(AVCodecContext *avctx)
avctx->pix_fmt = avctx->codec->pix_fmts[0];
if (!s->context_initialized) {
- s->width = avctx->width;
- s->height = avctx->height;
h->chroma_qp[0] = h->chroma_qp[1] = 4;
svq3->halfpel_flag = 1;
svq3->thirdpel_flag = 1;
svq3->unknown_flag = 0;
- if (MPV_common_init(s) < 0)
- return -1;
-
- h->b_stride = 4*s->mb_width;
-
- ff_h264_alloc_tables(h);
-
/* prowl for the "SEQH" marker in the extradata */
extradata = (unsigned char *)avctx->extradata;
for (m = 0; m < avctx->extradata_size; m++) {
@@ -920,6 +911,16 @@ static av_cold int svq3_decode_init(AVCodecContext *avctx)
#endif
}
}
+
+ s->width = avctx->width;
+ s->height = avctx->height;
+
+ if (MPV_common_init(s) < 0)
+ return -1;
+
+ h->b_stride = 4*s->mb_width;
+
+ ff_h264_alloc_tables(h);
}
return 0;