Commit c084a975 authored by Anton Khirnov's avatar Anton Khirnov

lavc: use av_mallocz to allocate AVFrames.

Otherwise the frame is uninitialized, so avcodec_get_frame_defaults()
cannot determine whether to free extended_data.
parent a83499b1
...@@ -645,7 +645,7 @@ void avcodec_get_frame_defaults(AVFrame *frame) ...@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment