summaryrefslogtreecommitdiff
path: root/libavcodec/rv34.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-09 14:36:47 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-09 15:18:46 +0200
commit59a53842d360ddaf883a0415b11013038fa57da0 (patch)
treebec280eb85d158ae75e54268cef1ebdd47be563c /libavcodec/rv34.c
parent60ef0c6f909703ae4dc021f6857d254c7badc1ec (diff)
parentf6774f905fb3cfdc319523ac640be30b14c1bc55 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: mpegvideo: operate with pointers to AVFrames instead of whole structs Conflicts: libavcodec/h261dec.c libavcodec/h263dec.c libavcodec/intrax8.c libavcodec/mpeg12enc.c libavcodec/mpegvideo.c libavcodec/mpegvideo.h libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_motion.c libavcodec/mpegvideo_xvmc.c libavcodec/msmpeg4.c libavcodec/ratecontrol.c libavcodec/vaapi.c libavcodec/vc1dec.c libavcodec/vdpau_vc1.c See: fc567ac49e17151f00f31b59030cd10f952612ef Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/rv34.c')
-rw-r--r--libavcodec/rv34.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c
index 4d7fd8f27a..4bae2c4112 100644
--- a/libavcodec/rv34.c
+++ b/libavcodec/rv34.c
@@ -709,9 +709,9 @@ static inline void rv34_mc(RV34DecContext *r, const int block_type,
}
dxy = ly*4 + lx;
- srcY = dir ? s->next_picture_ptr->f.data[0] : s->last_picture_ptr->f.data[0];
- srcU = dir ? s->next_picture_ptr->f.data[1] : s->last_picture_ptr->f.data[1];
- srcV = dir ? s->next_picture_ptr->f.data[2] : s->last_picture_ptr->f.data[2];
+ srcY = dir ? s->next_picture_ptr->f->data[0] : s->last_picture_ptr->f->data[0];
+ srcU = dir ? s->next_picture_ptr->f->data[1] : s->last_picture_ptr->f->data[1];
+ srcV = dir ? s->next_picture_ptr->f->data[2] : s->last_picture_ptr->f->data[2];
src_x = s->mb_x * 16 + xoff + mx;
src_y = s->mb_y * 16 + yoff + my;
uvsrc_x = s->mb_x * 8 + (xoff >> 1) + umx;
@@ -1591,13 +1591,13 @@ static int finish_frame(AVCodecContext *avctx, AVFrame *pict)
ff_thread_report_progress(&s->current_picture_ptr->tf, INT_MAX, 0);
if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {
- if ((ret = av_frame_ref(pict, &s->current_picture_ptr->f)) < 0)
+ if ((ret = av_frame_ref(pict, s->current_picture_ptr->f)) < 0)
return ret;
ff_print_debug_info(s, s->current_picture_ptr, pict);
ff_mpv_export_qp_table(s, pict, s->current_picture_ptr, FF_QSCALE_TYPE_MPEG1);
got_picture = 1;
} else if (s->last_picture_ptr != NULL) {
- if ((ret = av_frame_ref(pict, &s->last_picture_ptr->f)) < 0)
+ if ((ret = av_frame_ref(pict, s->last_picture_ptr->f)) < 0)
return ret;
ff_print_debug_info(s, s->last_picture_ptr, pict);
ff_mpv_export_qp_table(s, pict, s->last_picture_ptr, FF_QSCALE_TYPE_MPEG1);
@@ -1636,7 +1636,7 @@ int ff_rv34_decode_frame(AVCodecContext *avctx,
if (buf_size == 0) {
/* special case for last picture */
if (s->low_delay==0 && s->next_picture_ptr) {
- if ((ret = av_frame_ref(pict, &s->next_picture_ptr->f)) < 0)
+ if ((ret = av_frame_ref(pict, s->next_picture_ptr->f)) < 0)
return ret;
s->next_picture_ptr = NULL;
@@ -1664,7 +1664,7 @@ int ff_rv34_decode_frame(AVCodecContext *avctx,
av_log(avctx, AV_LOG_ERROR, "First slice header is incorrect\n");
return AVERROR_INVALIDDATA;
}
- if ((!s->last_picture_ptr || !s->last_picture_ptr->f.data[0]) &&
+ if ((!s->last_picture_ptr || !s->last_picture_ptr->f->data[0]) &&
si.type == AV_PICTURE_TYPE_B) {
av_log(avctx, AV_LOG_ERROR, "Invalid decoder state: B-frame without "
"reference data.\n");