diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-09-19 15:30:24 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-09-19 15:30:34 +0200 |
commit | 8846115b1a5c29892fdf2c74747f71d37e16e864 (patch) | |
tree | 4ab64b8114601175846df80eedfa3ea7d49df657 /libavcodec/rv34.c | |
parent | 67d501b4f1758ba0783b14da4a6b3abd506792fa (diff) | |
parent | b16d001b628237c93529c2be169ea5af1be7c9d7 (diff) | |
download | ffmpeg-streaming-8846115b1a5c29892fdf2c74747f71d37e16e864.zip ffmpeg-streaming-8846115b1a5c29892fdf2c74747f71d37e16e864.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
rv34: use ff_MPV_common_frame_size_change()
mpegvideo: add reinit function for frame parameter changes
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/rv34.c')
-rw-r--r-- | libavcodec/rv34.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c index 5c19735..4ca134e 100644 --- a/libavcodec/rv34.c +++ b/libavcodec/rv34.c @@ -1537,10 +1537,9 @@ int ff_rv34_decode_update_thread_context(AVCodecContext *dst, const AVCodecConte return 0; if (s->height != s1->height || s->width != s1->width) { - ff_MPV_common_end(s); s->height = s1->height; s->width = s1->width; - if ((err = ff_MPV_common_init(s)) < 0) + if ((err = ff_MPV_common_frame_size_change(s)) < 0) return err; if ((err = rv34_decoder_realloc(r)) < 0) return err; @@ -1659,20 +1658,13 @@ int ff_rv34_decode_frame(AVCodecContext *avctx, if (s->width != si.width || s->height != si.height) { int err; - if (HAVE_THREADS && - (s->avctx->active_thread_type & FF_THREAD_FRAME)) { - av_log_missing_feature(s->avctx, "Width/height changing with " - "frame threading is", 0); - return AVERROR_PATCHWELCOME; - } - av_log(s->avctx, AV_LOG_WARNING, "Changing dimensions to %dx%d\n", si.width, si.height); - ff_MPV_common_end(s); + s->width = si.width; s->height = si.height; avcodec_set_dimensions(s->avctx, s->width, s->height); - if ((err = ff_MPV_common_init(s)) < 0) + if ((err = ff_MPV_common_frame_size_change(s)) < 0) return err; if ((err = rv34_decoder_realloc(r)) < 0) return err; |