mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-18 13:00:00 +01: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:
@@ -329,6 +329,7 @@ int of_submit_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost)
|
|||||||
/* the muxer is not initialized yet, buffer the packet */
|
/* the muxer is not initialized yet, buffer the packet */
|
||||||
ret = queue_packet(of, ost, pkt);
|
ret = queue_packet(of, ost, pkt);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
if (pkt)
|
||||||
av_packet_unref(pkt);
|
av_packet_unref(pkt);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user