Browse Source

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>
tags/n1.0
Michael Niedermayer 13 years ago
parent
commit
8deddc6961
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavcodec/utils.c

+ 2
- 1
libavcodec/utils.c 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;


Loading…
Cancel
Save