mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
avplay: Free frame and graph when memory allocation fails
Bug-Id: CID 1291564 Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
This commit is contained in:
parent
eb31256f12
commit
336d2f0979
10
avplay.c
10
avplay.c
@ -1580,8 +1580,10 @@ static int video_thread(void *arg)
|
|||||||
AVFilterContext *filt_out = NULL, *filt_in = NULL;
|
AVFilterContext *filt_out = NULL, *filt_in = NULL;
|
||||||
int last_w = is->video_st->codec->width;
|
int last_w = is->video_st->codec->width;
|
||||||
int last_h = is->video_st->codec->height;
|
int last_h = is->video_st->codec->height;
|
||||||
if (!graph)
|
if (!graph) {
|
||||||
|
av_frame_free(&frame);
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
}
|
||||||
|
|
||||||
if ((ret = configure_video_filters(graph, is, vfilters)) < 0)
|
if ((ret = configure_video_filters(graph, is, vfilters)) < 0)
|
||||||
goto the_end;
|
goto the_end;
|
||||||
@ -1589,8 +1591,12 @@ static int video_thread(void *arg)
|
|||||||
filt_out = is->out_video_filter;
|
filt_out = is->out_video_filter;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!frame)
|
if (!frame) {
|
||||||
|
#if CONFIG_AVFILTER
|
||||||
|
avfilter_graph_free(&graph);
|
||||||
|
#endif
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
}
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
#if CONFIG_AVFILTER
|
#if CONFIG_AVFILTER
|
||||||
|
Loading…
x
Reference in New Issue
Block a user