From patchwork Fri Dec 14 20:52:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 11417 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 A7AAB44D5A2 for ; Fri, 14 Dec 2018 22:53:33 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C578968AAF6; Fri, 14 Dec 2018 22:53:33 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-qmta-pe01-1.mx.upcmail.net (vie01a-qmta-pe01-1.mx.upcmail.net [62.179.121.178]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0DCC168AAB9 for ; Fri, 14 Dec 2018 22:53:28 +0200 (EET) Received: from [172.31.218.53] (helo=vie01a-dmta-pe08-2.mx.upcmail.net) by vie01a-pqmta-pe01.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1gXuSd-00087C-Kf for ffmpeg-devel@ffmpeg.org; Fri, 14 Dec 2018 21:53:27 +0100 Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe08.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1gXuSY-000192-1C for ffmpeg-devel@ffmpeg.org; Fri, 14 Dec 2018 21:53:22 +0100 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id XuRagjJaj2WSsXuRagXUsG; Fri, 14 Dec 2018 21:52:22 +0100 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.41.20 X-CNFS-Analysis: v=2.3 cv=E7kcWpVl c=1 sm=1 tr=0 a=I1eytVlZLDX1BM2VTtTtSw==:117 a=I1eytVlZLDX1BM2VTtTtSw==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=NhQW1L10MOfnqSh6RIgA:9 a=pHzHmUro8NiASowvMSCR:22 a=6VlIyEUom7LUIeUMNQJH:22 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 14 Dec 2018 21:52:09 +0100 Message-Id: <20181214205209.22253-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 X-CMAE-Envelope: MS4wfF2W4VABWt/vrsK9JtxtXOR3WfNZ7G7CGXIhFK9lXWzBM65E75eHo/GOGn7yDwwMdRlYBLCHnT7LOPaAmrESp5Cofp5w8/ERv/snFmK4h1wAIjlqIHeb RfpMosTAchN4rEUwxsL6IoAQjdKk6LS41U3+MrPL7lLPaRfXqXEefKZT Subject: [FFmpeg-devel] [PATCH] avformat/nutenc: Document trailer index assert better 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Michael Niedermayer --- libavformat/nutenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c index a92ff55c01..e9a3bb49db 100644 --- a/libavformat/nutenc.c +++ b/libavformat/nutenc.c @@ -1172,7 +1172,7 @@ static int nut_write_trailer(AVFormatContext *s) ret = avio_open_dyn_buf(&dyn_bc); if (ret >= 0 && nut->sp_count) { - av_assert1(nut->write_index); + av_assert1(nut->write_index); // sp_count should be 0 if no index is going to be written write_index(nut, dyn_bc); put_packet(nut, bc, dyn_bc, 1, INDEX_STARTCODE); }