diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-05-22 21:57:30 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-05-22 22:15:32 +0300 |
commit | a25ee5f9228d495fb9a69512632686cfa26df32f (patch) | |
tree | 28406eb4e763cdd0f031d0d49e2574ac61b23214 /libavcodec/mpegvideo_enc.c | |
parent | bc373595f28e20f69505dd0d29f716935c06f958 (diff) | |
parent | d528045558825f01472e9bee873f60c98d661e53 (diff) |
Merge commit 'd528045558825f01472e9bee873f60c98d661e53'
* commit 'd528045558825f01472e9bee873f60c98d661e53':
mpegvideo: Have ff_mpeg_unref_picture use AVCodecContext directly
Conflicts:
libavcodec/mpegvideo.c
libavcodec/mpegvideo_enc.c
The memset is left in place
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpegvideo_enc.c')
-rw-r--r-- | libavcodec/mpegvideo_enc.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 3a1b3d65ac..6c8559fd54 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -1016,7 +1016,7 @@ av_cold int ff_mpv_encode_end(AVCodecContext *avctx) av_frame_free(&s->tmp_frames[i]); ff_free_picture_tables(&s->new_picture); - ff_mpeg_unref_picture(s, &s->new_picture); + ff_mpeg_unref_picture(s->avctx, &s->new_picture); av_freep(&s->avctx->stats_out); av_freep(&s->ac_stats); @@ -1519,7 +1519,7 @@ no_output_pic: s->reordered_input_picture[0]->f->pict_type != AV_PICTURE_TYPE_B ? 3 : 0; - ff_mpeg_unref_picture(s, &s->new_picture); + ff_mpeg_unref_picture(s->avctx, &s->new_picture); if ((ret = ff_mpeg_ref_picture(s, &s->new_picture, s->reordered_input_picture[0]))) return ret; @@ -1554,14 +1554,14 @@ no_output_pic: s->new_picture.f->data[i] += INPLACE_OFFSET; } } - ff_mpeg_unref_picture(s, &s->current_picture); + ff_mpeg_unref_picture(s->avctx, &s->current_picture); if ((ret = ff_mpeg_ref_picture(s, &s->current_picture, s->current_picture_ptr)) < 0) return ret; s->picture_number = s->new_picture.f->display_picture_number; } else { - ff_mpeg_unref_picture(s, &s->new_picture); + ff_mpeg_unref_picture(s->avctx, &s->new_picture); } return 0; } @@ -1635,13 +1635,13 @@ static int frame_start(MpegEncContext *s) if (s->pict_type != AV_PICTURE_TYPE_B && s->last_picture_ptr && s->last_picture_ptr != s->next_picture_ptr && s->last_picture_ptr->f->buf[0]) { - ff_mpeg_unref_picture(s, s->last_picture_ptr); + ff_mpeg_unref_picture(s->avctx, s->last_picture_ptr); } s->current_picture_ptr->f->pict_type = s->pict_type; s->current_picture_ptr->f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; - ff_mpeg_unref_picture(s, &s->current_picture); + ff_mpeg_unref_picture(s->avctx, &s->current_picture); if ((ret = ff_mpeg_ref_picture(s, &s->current_picture, s->current_picture_ptr)) < 0) return ret; @@ -1653,14 +1653,14 @@ static int frame_start(MpegEncContext *s) } if (s->last_picture_ptr) { - ff_mpeg_unref_picture(s, &s->last_picture); + 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, s->last_picture_ptr)) < 0) return ret; } if (s->next_picture_ptr) { - ff_mpeg_unref_picture(s, &s->next_picture); + 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, s->next_picture_ptr)) < 0) @@ -1914,7 +1914,7 @@ vbv_retry: /* release non-reference frames */ for (i = 0; i < MAX_PICTURE_COUNT; i++) { if (!s->picture[i].reference) - ff_mpeg_unref_picture(s, &s->picture[i]); + ff_mpeg_unref_picture(s->avctx, &s->picture[i]); } av_assert1((s->frame_bits & 7) == 0); |