mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
examples/muxing: fix av_frame_free() not called when got_packet is false
Hi list! Since my last patch (fix 2 memleaks in doc/examples/muxing.c) I found more problems to fix. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
8baaa924bd
commit
b6714fa077
@ -269,7 +269,7 @@ static void write_audio_frame(AVFormatContext *oc, AVStream *st)
|
||||
}
|
||||
|
||||
if (!got_packet)
|
||||
return;
|
||||
goto freeframe;
|
||||
|
||||
pkt.stream_index = st->index;
|
||||
|
||||
@ -280,6 +280,7 @@ static void write_audio_frame(AVFormatContext *oc, AVStream *st)
|
||||
av_err2str(ret));
|
||||
exit(1);
|
||||
}
|
||||
freeframe:
|
||||
av_frame_free(&frame);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user