diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-11-17 03:31:32 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-11-17 03:31:32 +0100 |
commit | 92cbd775687204f9750a09c69f97702719036aab (patch) | |
tree | 16a375879e56045652edd2dd8f604bb7fb2fb4d0 /libavcodec/vc1dec.c | |
parent | 9ad477d9098b5281cede0bd8525ca90b0e52436d (diff) | |
parent | d48c20630214a4effcc920e93a5044bee4e2002e (diff) | |
download | ffmpeg-92cbd775687204f9750a09c69f97702719036aab.tar.gz |
Merge commit 'd48c20630214a4effcc920e93a5044bee4e2002e'
* commit 'd48c20630214a4effcc920e93a5044bee4e2002e':
qtrleenc: use the AVFrame API properly.
ulti: use the AVFrame API properly.
vc1: use the AVFrame API properly.
flashsv: use the AVFrame API properly.
Conflicts:
libavcodec/flashsv.c
libavcodec/qtrleenc.c
libavcodec/ulti.c
libavcodec/vc1dec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vc1dec.c')
-rw-r--r-- | libavcodec/vc1dec.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index 0f6ebac22f..a81f96182b 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -5379,8 +5379,8 @@ static void vc1_draw_sprites(VC1Context *v, SpriteData* sd) int width = v->output_width>>!!plane; for (row = 0; row < v->output_height>>!!plane; row++) { - uint8_t *dst = v->sprite_output_frame.data[plane] + - v->sprite_output_frame.linesize[plane] * row; + uint8_t *dst = v->sprite_output_frame->data[plane] + + v->sprite_output_frame->linesize[plane] * row; for (sprite = 0; sprite <= v->two_sprites; sprite++) { uint8_t *iplane = s->current_picture.f.data[plane]; @@ -5471,8 +5471,8 @@ static int vc1_decode_sprites(VC1Context *v, GetBitContext* gb) v->two_sprites = 0; } - av_frame_unref(&v->sprite_output_frame); - if ((ret = ff_get_buffer(avctx, &v->sprite_output_frame, 0)) < 0) + av_frame_unref(v->sprite_output_frame); + if ((ret = ff_get_buffer(avctx, v->sprite_output_frame, 0)) < 0) return ret; vc1_draw_sprites(v, &sd); @@ -5699,6 +5699,10 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx) v->res_sprite = (avctx->codec_id == AV_CODEC_ID_VC1IMAGE); } + v->sprite_output_frame = av_frame_alloc(); + if (!v->sprite_output_frame) + return AVERROR(ENOMEM); + avctx->profile = v->profile; if (v->profile == PROFILE_ADVANCED) avctx->level = v->level; @@ -5745,7 +5749,7 @@ av_cold int ff_vc1_decode_end(AVCodecContext *avctx) VC1Context *v = avctx->priv_data; int i; - av_frame_unref(&v->sprite_output_frame); + av_frame_free(&v->sprite_output_frame); for (i = 0; i < 4; i++) av_freep(&v->sr_rows[i >> 1][i & 1]); @@ -6200,7 +6204,7 @@ image: if (vc1_decode_sprites(v, &s->gb)) goto err; #endif - if ((ret = av_frame_ref(pict, &v->sprite_output_frame)) < 0) + if ((ret = av_frame_ref(pict, v->sprite_output_frame)) < 0) goto err; *got_frame = 1; } else { |