diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2009-11-28 21:32:33 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2009-11-28 21:32:33 +0000 |
commit | bbf266fdb5fab3edc62eeb3ed1535db0d636738e (patch) | |
tree | e3891b774a9ab08cf16df35ce1a1ecb629de2401 /libavcodec | |
parent | 1206f1d630e17c332390f62a5ebbe254ebfe1dd4 (diff) | |
download | ffmpeg-bbf266fdb5fab3edc62eeb3ed1535db0d636738e.tar.gz |
Move mpeg_decode_postinit() out of bitstream decoding functions, it does not
belong in there.
Originally committed as revision 20642 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mpeg12.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index aa075da605..7afc3ba1bb 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -1352,9 +1352,6 @@ static int mpeg1_decode_picture(AVCodecContext *avctx, MpegEncContext *s = &s1->mpeg_enc_ctx; int ref, f_code, vbv_delay; - if(mpeg_decode_postinit(s->avctx) < 0) - return -2; - init_get_bits(&s->gb, buf, buf_size*8); ref = get_bits(&s->gb, 10); /* temporal ref */ @@ -2304,6 +2301,11 @@ static int decode_chunks(AVCodecContext *avctx, break; case PICTURE_START_CODE: + if(mpeg_decode_postinit(avctx) < 0){ + av_log(avctx, AV_LOG_ERROR, "mpeg_decode_postinit() failure\n"); + return -1; + } + /* we have a complete image: we try to decompress it */ if(mpeg1_decode_picture(avctx, buf_ptr, input_size) < 0) |