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:
parent
3141dbb7ad
commit
072e3f710e
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user