mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
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:
parent
d9d56712e9
commit
8deddc6961
@ -720,11 +720,12 @@ void avcodec_get_frame_defaults(AVFrame *frame)
|
|||||||
|
|
||||||
AVFrame *avcodec_alloc_frame(void)
|
AVFrame *avcodec_alloc_frame(void)
|
||||||
{
|
{
|
||||||
AVFrame *frame = av_mallocz(sizeof(AVFrame));
|
AVFrame *frame = av_malloc(sizeof(AVFrame));
|
||||||
|
|
||||||
if (frame == NULL)
|
if (frame == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
frame->extended_data = NULL;
|
||||||
avcodec_get_frame_defaults(frame);
|
avcodec_get_frame_defaults(frame);
|
||||||
|
|
||||||
return frame;
|
return frame;
|
||||||
|
Loading…
Reference in New Issue
Block a user