From patchwork Thu Dec 15 20:21:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 1814 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.65.86 with SMTP id o83csp954466vsa; Thu, 15 Dec 2016 12:22:20 -0800 (PST) X-Received: by 10.28.149.135 with SMTP id x129mr112838wmd.71.1481833340705; Thu, 15 Dec 2016 12:22:20 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id z2si3823070wjz.7.2016.12.15.12.22.20; Thu, 15 Dec 2016 12:22:20 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 83169689A87; Thu, 15 Dec 2016 22:21:26 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-qmta-pe01-3.mx.upcmail.net (vie01a-qmta-pe01-3.mx.upcmail.net [62.179.121.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C8FC2689948 for ; Thu, 15 Dec 2016 22:21:16 +0200 (EET) Received: from [172.31.218.36] (helo=vie01a-dmta-pe02-3.mx.upcmail.net) by vie01a-pqmta-pe01.mx.upcmail.net with esmtp (Exim 4.87) (envelope-from ) id 1cHcWo-0004Fz-VW for ffmpeg-devel@ffmpeg.org; Thu, 15 Dec 2016 21:21:22 +0100 Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe02.mx.upcmail.net with esmtp (Exim 4.87) (envelope-from ) id 1cHcWj-0007Pw-MY for ffmpeg-devel@ffmpeg.org; Thu, 15 Dec 2016 21:21:17 +0100 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id LLMG1u00t0S5wYM01LMHlX; Thu, 15 Dec 2016 21:21:17 +0100 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Thu, 15 Dec 2016 21:21:09 +0100 Message-Id: <20161215202113.20807-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20161215202113.20807-1-michael@niedermayer.cc> References: <20161215202113.20807-1-michael@niedermayer.cc> Subject: [FFmpeg-devel] [PATCH 3/7] avcodec/tdsc: return the packet size instead of 0 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Most decoders return the amount of data used. This is more consistent Signed-off-by: Michael Niedermayer --- libavcodec/tdsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/tdsc.c b/libavcodec/tdsc.c index d1265a006d..8460568d7d 100644 --- a/libavcodec/tdsc.c +++ b/libavcodec/tdsc.c @@ -609,7 +609,7 @@ static int tdsc_decode_frame(AVCodecContext *avctx, void *data, } *got_frame = 1; - return 0; + return avpkt->size; } AVCodec ff_tdsc_decoder = {