fftools/ffmpeg_mux: do not unref a NULL packet

The packet submitted to of_submit_packet() may be NULL to signal EOF.
pull/388/head
Anton Khirnov 2 years ago
parent 3141dbb7ad
commit 072e3f710e
  1. 3
      fftools/ffmpeg_mux.c

@ -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…
Cancel
Save