diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-04-27 22:09:20 +0100 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-05-22 15:34:39 +0100 |
commit | a3f4c930ac3f49f47b6e6ffda925d0dcf80320e2 (patch) | |
tree | a1909aba70f70124cb8a8c8e3915724c88894de7 /libavcodec/mpegvideo.c | |
parent | d528045558825f01472e9bee873f60c98d661e53 (diff) |
mpegvideo: Have ff_mpeg_ref_picture use AVCodecContext directly
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r-- | libavcodec/mpegvideo.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 6a8c7e0433..8055d15178 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -727,7 +727,7 @@ do {\ return 0; } -int ff_mpeg_ref_picture(MpegEncContext *s, Picture *dst, Picture *src) +int ff_mpeg_ref_picture(AVCodecContext *avctx, Picture *dst, Picture *src) { int ret; @@ -761,7 +761,7 @@ int ff_mpeg_ref_picture(MpegEncContext *s, Picture *dst, Picture *src) return 0; fail: - ff_mpeg_unref_picture(s->avctx, dst); + ff_mpeg_unref_picture(avctx, dst); return ret; } @@ -937,7 +937,7 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst, for (i = 0; i < MAX_PICTURE_COUNT; i++) { ff_mpeg_unref_picture(s->avctx, &s->picture[i]); if (s1->picture[i].f->buf[0] && - (ret = ff_mpeg_ref_picture(s, &s->picture[i], &s1->picture[i])) < 0) + (ret = ff_mpeg_ref_picture(s->avctx, &s->picture[i], &s1->picture[i])) < 0) return ret; } @@ -945,7 +945,7 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst, do {\ ff_mpeg_unref_picture(s->avctx, &s->pic);\ if (s1->pic.f->buf[0])\ - ret = ff_mpeg_ref_picture(s, &s->pic, &s1->pic);\ + ret = ff_mpeg_ref_picture(s->avctx, &s->pic, &s1->pic);\ else\ ret = update_picture_tables(&s->pic, &s1->pic);\ if (ret < 0)\ @@ -1741,7 +1741,7 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx) // s->current_picture_ptr->quality = s->new_picture_ptr->quality; s->current_picture_ptr->f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; - if ((ret = ff_mpeg_ref_picture(s, &s->current_picture, + if ((ret = ff_mpeg_ref_picture(s->avctx, &s->current_picture, s->current_picture_ptr)) < 0) return ret; @@ -1822,14 +1822,14 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx) if (s->last_picture_ptr) { ff_mpeg_unref_picture(s->avctx, &s->last_picture); if (s->last_picture_ptr->f->buf[0] && - (ret = ff_mpeg_ref_picture(s, &s->last_picture, + (ret = ff_mpeg_ref_picture(s->avctx, &s->last_picture, s->last_picture_ptr)) < 0) return ret; } if (s->next_picture_ptr) { ff_mpeg_unref_picture(s->avctx, &s->next_picture); if (s->next_picture_ptr->f->buf[0] && - (ret = ff_mpeg_ref_picture(s, &s->next_picture, + (ret = ff_mpeg_ref_picture(s->avctx, &s->next_picture, s->next_picture_ptr)) < 0) return ret; } |