diff options
author | Mans Rullgard <mans@mansr.com> | 2011-07-25 15:51:36 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2011-07-27 20:14:12 +0100 |
commit | c3027b4d2f9d14906387ced6f73008d4fa2c2dfb (patch) | |
tree | 712ba7c17e4b6c7501c7f90a6c07f0614a6b4199 /libavcodec | |
parent | 093ee8e199d758d3f8576354fc4783a5e54eb970 (diff) | |
download | ffmpeg-c3027b4d2f9d14906387ced6f73008d4fa2c2dfb.tar.gz |
mpegvideo: initialise DSPContext in ff_dct_common_init()
The functions and tables initialised in this function rely on an
initialised DSPContext. Make sure they always have one.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mpegvideo.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index d422e12bc1..365a0d4736 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -155,6 +155,8 @@ const uint8_t *ff_find_start_code(const uint8_t * restrict p, const uint8_t *end /* init common dct for both encoder and decoder */ av_cold int ff_dct_common_init(MpegEncContext *s) { + dsputil_init(&s->dsp, s->avctx); + s->dct_unquantize_h263_intra = dct_unquantize_h263_intra_c; s->dct_unquantize_h263_inter = dct_unquantize_h263_inter_c; s->dct_unquantize_mpeg1_intra = dct_unquantize_mpeg1_intra_c; @@ -603,7 +605,6 @@ av_cold int MPV_common_init(MpegEncContext *s) if((s->width || s->height) && av_image_check_size(s->width, s->height, 0, s->avctx)) return -1; - dsputil_init(&s->dsp, s->avctx); ff_dct_common_init(s); s->flags= s->avctx->flags; |