History

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.

Anton Khirnov committed 12 years ago

Commit 2d1f4281 parent b06c8bc1 file · +4 −4Browse files

Unified · Split

libavcodec/mpegvideo.c+4−4
@@ -1036,14 +1036,14 @@ av_cold int ff_MPV_common_init(MpegEncContext *s) · 1035 unmodified lines
10361036 FF_ALLOCZ_OR_GOTO(s->avctx, s->picture,
10371037 MAX_PICTURE_COUNT * sizeof(Picture), fail);
10381038 for (i = 0; i < MAX_PICTURE_COUNT; i++) {
1039− avcodec_get_frame_defaults(&s->picture[i].f);
1039+ av_frame_unref(&s->picture[i].f);
10401040 }
10411041 memset(&s->next_picture, 0, sizeof(s->next_picture));
10421042 memset(&s->last_picture, 0, sizeof(s->last_picture));
10431043 memset(&s->current_picture, 0, sizeof(s->current_picture));
1044− avcodec_get_frame_defaults(&s->next_picture.f);
1045− avcodec_get_frame_defaults(&s->last_picture.f);
1046− avcodec_get_frame_defaults(&s->current_picture.f);
1044+ av_frame_unref(&s->next_picture.f);
1045+ av_frame_unref(&s->last_picture.f);
1046+ av_frame_unref(&s->current_picture.f);
10471047
10481048 if (s->width && s->height) {
10491049 if (init_context_frame(s))

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t