1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00

fftools/ffmpeg_mux: do not unref a NULL packet

The packet submitted to of_submit_packet() may be NULL to signal EOF.
This commit is contained in:
Anton Khirnov 2022-10-11 12:32:02 +02:00
parent 3141dbb7ad
commit 072e3f710e

View File

@ -329,7 +329,8 @@ int of_submit_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost)
/* the muxer is not initialized yet, buffer the packet */
ret = queue_packet(of, ost, pkt);
if (ret < 0) {
av_packet_unref(pkt);
if (pkt)
av_packet_unref(pkt);
return ret;
}
}