mirror of https://git.ffmpeg.org/ffmpeg.git
lavf: free packets for muxers implementing interleave_packet().
Fixes a memleak.
This commit is contained in:
parent
f97cb45156
commit
aa2e4bb058
|
@ -3218,9 +3218,12 @@ int av_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out, AVPacket *pk
|
||||||
* < 0 if an error occurred
|
* < 0 if an error occurred
|
||||||
*/
|
*/
|
||||||
static int interleave_packet(AVFormatContext *s, AVPacket *out, AVPacket *in, int flush){
|
static int interleave_packet(AVFormatContext *s, AVPacket *out, AVPacket *in, int flush){
|
||||||
if(s->oformat->interleave_packet)
|
if (s->oformat->interleave_packet) {
|
||||||
return s->oformat->interleave_packet(s, out, in, flush);
|
int ret = s->oformat->interleave_packet(s, out, in, flush);
|
||||||
else
|
if (in)
|
||||||
|
av_free_packet(in);
|
||||||
|
return ret;
|
||||||
|
} else
|
||||||
return av_interleave_packet_per_dts(s, out, in, flush);
|
return av_interleave_packet_per_dts(s, out, in, flush);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue