mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
fftools/ffmpeg_mux: inline mux_free() into of_close()
mux_free() is no longer called from anywhere else.
This commit is contained in:
parent
36ce335d46
commit
d6195c88e2
@ -599,8 +599,20 @@ static void fc_close(AVFormatContext **pfc)
|
||||
*pfc = NULL;
|
||||
}
|
||||
|
||||
static void mux_free(Muxer *mux)
|
||||
void of_close(OutputFile **pof)
|
||||
{
|
||||
OutputFile *of = *pof;
|
||||
Muxer *mux;
|
||||
|
||||
if (!of)
|
||||
return;
|
||||
mux = mux_from_of(of);
|
||||
|
||||
thread_stop(mux);
|
||||
|
||||
sq_free(&of->sq_encode);
|
||||
sq_free(&of->sq_mux);
|
||||
|
||||
for (int i = 0; i < mux->of.nb_streams; i++) {
|
||||
MuxStream *ms = &mux->streams[i];
|
||||
AVPacket *pkt;
|
||||
@ -618,23 +630,6 @@ static void mux_free(Muxer *mux)
|
||||
av_packet_free(&mux->sq_pkt);
|
||||
|
||||
fc_close(&mux->fc);
|
||||
}
|
||||
|
||||
void of_close(OutputFile **pof)
|
||||
{
|
||||
OutputFile *of = *pof;
|
||||
Muxer *mux;
|
||||
|
||||
if (!of)
|
||||
return;
|
||||
mux = mux_from_of(of);
|
||||
|
||||
thread_stop(mux);
|
||||
|
||||
sq_free(&of->sq_encode);
|
||||
sq_free(&of->sq_mux);
|
||||
|
||||
mux_free(mux_from_of(of));
|
||||
|
||||
av_freep(pof);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user