avcodec_alloc_frame: dont zero the whole struct twice

cleaning it up is already done in avcodec_get_frame_defaults()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-09-25 17:36:17 +02:00
parent d9d56712e9
commit 8deddc6961

View File

@ -720,11 +720,12 @@ void avcodec_get_frame_defaults(AVFrame *frame)
AVFrame *avcodec_alloc_frame(void)
{
AVFrame *frame = av_mallocz(sizeof(AVFrame));
AVFrame *frame = av_malloc(sizeof(AVFrame));
if (frame == NULL)
return NULL;
frame->extended_data = NULL;
avcodec_get_frame_defaults(frame);
return frame;