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 */
|
/* 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) {
|
||||||
av_packet_unref(pkt);
|
if (pkt)
|
||||||
|
av_packet_unref(pkt);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user