Skip to content
Snippets Groups Projects
Commit c084a975 authored by Anton Khirnov's avatar Anton Khirnov
Browse files

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
No related branches found
No related tags found
No related merge requests found
...@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment