mirror of https://git.ffmpeg.org/ffmpeg.git
lavc: use av_mallocz to allocate AVFrames.
Otherwise the frame is uninitialized, so avcodec_get_frame_defaults() cannot determine whether to free extended_data.
This commit is contained in:
parent
a83499b13b
commit
c084a975aa
|
@ -645,7 +645,7 @@ void avcodec_get_frame_defaults(AVFrame *frame)
|
||||||
|
|
||||||
AVFrame *avcodec_alloc_frame(void)
|
AVFrame *avcodec_alloc_frame(void)
|
||||||
{
|
{
|
||||||
AVFrame *frame = av_malloc(sizeof(AVFrame));
|
AVFrame *frame = av_mallocz(sizeof(AVFrame));
|
||||||
|
|
||||||
if (frame == NULL)
|
if (frame == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue