diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-12-09 11:51:31 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-12-11 20:39:55 +0100 |
commit | 2d1f4288dd02a624cb8b86ab06371d6434c9da69 (patch) | |
tree | 083f902223c17f1f9f44aa35888e3a3657e147ea | |
parent | b06c8bce02b15115a4789252365df2dda0c4713c (diff) | |
download | ffmpeg-2d1f4288dd02a624cb8b86ab06371d6434c9da69.tar.gz |
mpegvideo: call av_frame_unref() instead of avcodec_get_frame_defaults().
This is a temporary workaround to allow deprecating
avcodec_get_frame_defaults(). The proper solution will be using a
properly allocated AVFrame in Picture.
-rw-r--r-- | libavcodec/mpegvideo.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 55fd935b2f..f39cdca3da 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1036,14 +1036,14 @@ av_cold int ff_MPV_common_init(MpegEncContext *s) FF_ALLOCZ_OR_GOTO(s->avctx, s->picture, MAX_PICTURE_COUNT * sizeof(Picture), fail); for (i = 0; i < MAX_PICTURE_COUNT; i++) { - avcodec_get_frame_defaults(&s->picture[i].f); + av_frame_unref(&s->picture[i].f); } memset(&s->next_picture, 0, sizeof(s->next_picture)); memset(&s->last_picture, 0, sizeof(s->last_picture)); memset(&s->current_picture, 0, sizeof(s->current_picture)); - avcodec_get_frame_defaults(&s->next_picture.f); - avcodec_get_frame_defaults(&s->last_picture.f); - avcodec_get_frame_defaults(&s->current_picture.f); + av_frame_unref(&s->next_picture.f); + av_frame_unref(&s->last_picture.f); + av_frame_unref(&s->current_picture.f); if (s->width && s->height) { if (init_context_frame(s)) |