From patchwork Sat Mar 28 18:15:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 18465 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 14F6B44B3B0 for ; Sat, 28 Mar 2020 20:15:33 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 01E5868B4AC; Sat, 28 Mar 2020 20:15:33 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5C3E068B4A2 for ; Sat, 28 Mar 2020 20:15:26 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 0116CE37AF; Sat, 28 Mar 2020 19:15:26 +0100 (CET) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qAJu8dJYdpVv; Sat, 28 Mar 2020 19:15:24 +0100 (CET) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id A9F5FE1D61; Sat, 28 Mar 2020 19:15:24 +0100 (CET) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Sat, 28 Mar 2020 19:15:09 +0100 Message-Id: <20200328181515.5333-2-cus@passwd.hu> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200328181515.5333-1-cus@passwd.hu> References: <20200328181515.5333-1-cus@passwd.hu> Subject: [FFmpeg-devel] [PATCH 2/8] avformat/mux: fix check_packet with null packet X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Marton Balint MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Marton Balint --- libavformat/mux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mux.c b/libavformat/mux.c index bfd1bf491b..dfb21c8aa5 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -798,7 +798,7 @@ static int prepare_input_packet(AVFormatContext *s, AVPacket *pkt) #if !FF_API_COMPUTE_PKT_FIELDS2 || !FF_API_LAVF_AVCTX /* sanitize the timestamps */ - if (!(s->oformat->flags & AVFMT_NOTIMESTAMPS)) { + if (pkt && !(s->oformat->flags & AVFMT_NOTIMESTAMPS)) { AVStream *st = s->streams[pkt->stream_index]; /* when there is no reordering (so dts is equal to pts), but