Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 01/13] fftools/ffmpeg_mux: do not unref a NULL packet
@ 2022-10-13 13:48 Anton Khirnov
  2022-10-13 13:48 ` [FFmpeg-devel] [PATCH 02/13] fftools/ffmpeg: move output_packet() to ffmpeg_mux Anton Khirnov
                   ` (13 more replies)
  0 siblings, 14 replies; 23+ messages in thread
From: Anton Khirnov @ 2022-10-13 13:48 UTC (permalink / raw)
  To: ffmpeg-devel

The packet submitted to of_submit_packet() may be NULL to signal EOF.
---
 fftools/ffmpeg_mux.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c
index 395f7cc89f..a6877ae5ec 100644
--- a/fftools/ffmpeg_mux.c
+++ b/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;
         }
     }
-- 
2.35.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2022-10-17  8:49 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-13 13:48 [FFmpeg-devel] [PATCH 01/13] fftools/ffmpeg_mux: do not unref a NULL packet Anton Khirnov
2022-10-13 13:48 ` [FFmpeg-devel] [PATCH 02/13] fftools/ffmpeg: move output_packet() to ffmpeg_mux Anton Khirnov
2022-10-13 13:48 ` [FFmpeg-devel] [PATCH 03/13] fftools/ffmpeg_mux: rename submit_packet() to thread_submit_packet() Anton Khirnov
2022-10-13 13:48 ` [FFmpeg-devel] [PATCH 04/13] fftools/ffmpeg_mux: drop the of_ prefix from of_submit_packet() Anton Khirnov
2022-10-13 13:48 ` [FFmpeg-devel] [PATCH 05/13] fftools/ffmpeg: move some stream initialization code to ffmpeg_mux Anton Khirnov
2022-10-13 13:48 ` [FFmpeg-devel] [PATCH 06/13] fftools/ffmpeg_opt: move opening output files into a new file Anton Khirnov
2022-10-13 13:48 ` [FFmpeg-devel] [PATCH 07/13] fftools/ffmpeg_mux: move Muxer and MuxStream to a new header Anton Khirnov
2022-10-13 13:48 ` [FFmpeg-devel] [PATCH 08/13] fftools/ffmpeg_mux: embed OutputFile in a Muxer Anton Khirnov
2022-10-13 13:49 ` [FFmpeg-devel] [PATCH 09/13] fftools/ffmpeg_mux: allocate sq_pkt in setup_sync_queues() Anton Khirnov
2022-10-13 13:49 ` [FFmpeg-devel] [PATCH 10/13] fftools/ffmpeg_mux: inline of_muxer_init() into of_open() Anton Khirnov
2022-10-13 13:49 ` [FFmpeg-devel] [PATCH 11/13] fftools/ffmpeg_mux: inline mux_free() into of_close() Anton Khirnov
2022-10-13 13:49 ` [FFmpeg-devel] [PATCH 12/13] fftools/ffmpeg_mux: move sq_mux from OutputFile to Muxer Anton Khirnov
2022-10-13 13:49 ` [FFmpeg-devel] [PATCH 13/13] fftools/ffmpeg: move init_output_bsfs() to ffmpeg_mux Anton Khirnov
2022-10-14 10:15 ` [FFmpeg-devel] [PATCH 14/22] fftools/ffmpeg: move freeing an output stream into a separate function Anton Khirnov
2022-10-14 10:15   ` [FFmpeg-devel] [PATCH 15/22] fftools/ffmpeg: reindent after previous commit Anton Khirnov
2022-10-14 10:15   ` [FFmpeg-devel] [PATCH 16/22] fftools/ffmpeg_mux_init: pass Muxer to new_output_stream() Anton Khirnov
2022-10-14 10:15   ` [FFmpeg-devel] [PATCH 17/22] fftools/ffmpeg: remove the output_streams global Anton Khirnov
2022-10-14 10:15   ` [FFmpeg-devel] [PATCH 18/22] fftools/ffmpeg: remove a cleanup block at the end of transcode() Anton Khirnov
2022-10-14 10:15   ` [FFmpeg-devel] [PATCH 19/22] fftools/ffmpeg: free output streams in of_close() Anton Khirnov
2022-10-14 10:15   ` [FFmpeg-devel] [PATCH 20/22] fftools/ffmpeg_mux: embed OutputStream in a MuxStream Anton Khirnov
2022-10-14 10:15   ` [FFmpeg-devel] [PATCH 21/22] fftools/ffmpeg_mux: move bsf_ctx from OutputStream to MuxStream Anton Khirnov
2022-10-14 10:15   ` [FFmpeg-devel] [PATCH 22/22] fftools/ffmpeg_mux: move muxing queue fields " Anton Khirnov
2022-10-17  8:49 ` [FFmpeg-devel] [PATCH 01/13] fftools/ffmpeg_mux: do not unref a NULL packet Anton Khirnov

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git