From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 0531640E80 for ; Fri, 31 Dec 2021 19:50:58 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BDDEF68B08F; Fri, 31 Dec 2021 21:50:44 +0200 (EET) Received: from mail.personalprojects.net (mail.personalprojects.net [51.79.67.80]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 15B2168B084 for ; Fri, 31 Dec 2021 21:50:38 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=personalprojects.net; s=20211201; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=81OecCl7m/fWPb7JLzk6gifugAs3opkn0J5Dvysyuts=; b=uh5OExFU4/eG5t0Qyn/1AvrskT JexCu5FLbfhiiTmcaCddDyxHXOjQwwuqap8G9PHTx5rEmSMC3wDKO4RHUMi08/kfA0bYadOxWJWkY f4sXOHtq/sWGKLG7vgn2QlcmSMwPIcAtpgcf0E6TuzJfsxUhb0XWJ2Czi6ZB1VjB3A0s=; Received: from bras-base-simcon3012w-grc-05-64-231-188-105.dsl.bell.ca ([64.231.188.105] helo=courtney.binaryfoundry.ca) by mail.personalprojects.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n3NvA-0006Oe-QA for ffmpeg-devel@ffmpeg.org; Fri, 31 Dec 2021 14:50:36 -0500 From: John-Paul Stewart To: ffmpeg-devel@ffmpeg.org Date: Fri, 31 Dec 2021 14:50:19 -0500 Message-Id: <20211231195019.16191-3-jpstewart@personalprojects.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211231195019.16191-1-jpstewart@personalprojects.net> References: <20211231195019.16191-1-jpstewart@personalprojects.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/2] avformat/mvdec: re-indent after last commit X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Signed-off-by: John-Paul Stewart --- libavformat/mvdec.c | 64 ++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/libavformat/mvdec.c b/libavformat/mvdec.c index 7493bcc762..469ac32092 100644 --- a/libavformat/mvdec.c +++ b/libavformat/mvdec.c @@ -350,40 +350,40 @@ static int mv_read_header(AVFormatContext *avctx) avio_skip(pb, 12); if (ast) { - ast->nb_frames = vst->nb_frames; - ast->codecpar->sample_rate = avio_rb32(pb); - if (ast->codecpar->sample_rate <= 0) { - av_log(avctx, AV_LOG_ERROR, "Invalid sample rate %d\n", ast->codecpar->sample_rate); - return AVERROR_INVALIDDATA; - } - avpriv_set_pts_info(ast, 33, 1, ast->codecpar->sample_rate); - - bytes_per_sample = avio_rb32(pb); - - v = avio_rb32(pb); - if (v == AUDIO_FORMAT_SIGNED) { - switch (bytes_per_sample) { - case 1: - ast->codecpar->codec_id = AV_CODEC_ID_PCM_S8; - break; - case 2: - ast->codecpar->codec_id = AV_CODEC_ID_PCM_S16BE; - break; - default: - avpriv_request_sample(avctx, "Audio sample size %i bytes", bytes_per_sample); - break; + ast->nb_frames = vst->nb_frames; + ast->codecpar->sample_rate = avio_rb32(pb); + if (ast->codecpar->sample_rate <= 0) { + av_log(avctx, AV_LOG_ERROR, "Invalid sample rate %d\n", ast->codecpar->sample_rate); + return AVERROR_INVALIDDATA; + } + avpriv_set_pts_info(ast, 33, 1, ast->codecpar->sample_rate); + + bytes_per_sample = avio_rb32(pb); + + v = avio_rb32(pb); + if (v == AUDIO_FORMAT_SIGNED) { + switch (bytes_per_sample) { + case 1: + ast->codecpar->codec_id = AV_CODEC_ID_PCM_S8; + break; + case 2: + ast->codecpar->codec_id = AV_CODEC_ID_PCM_S16BE; + break; + default: + avpriv_request_sample(avctx, "Audio sample size %i bytes", bytes_per_sample); + break; + } + } else { + avpriv_request_sample(avctx, "Audio compression (format %i)", v); } - } else { - avpriv_request_sample(avctx, "Audio compression (format %i)", v); - } - if (bytes_per_sample == 0) - return AVERROR_INVALIDDATA; + if (bytes_per_sample == 0) + return AVERROR_INVALIDDATA; - if (set_channels(avctx, ast, avio_rb32(pb)) < 0) - return AVERROR_INVALIDDATA; + if (set_channels(avctx, ast, avio_rb32(pb)) < 0) + return AVERROR_INVALIDDATA; - avio_skip(pb, 8); + avio_skip(pb, 8); } else avio_skip(pb, 24); /* skip meaningless audio metadata */ @@ -400,8 +400,8 @@ static int mv_read_header(AVFormatContext *avctx) return AVERROR_INVALIDDATA; avio_skip(pb, 8); if (ast) { - av_add_index_entry(ast, pos, timestamp, asize, 0, AVINDEX_KEYFRAME); - timestamp += asize / (ast->codecpar->channels * (uint64_t)bytes_per_sample); + av_add_index_entry(ast, pos, timestamp, asize, 0, AVINDEX_KEYFRAME); + timestamp += asize / (ast->codecpar->channels * (uint64_t)bytes_per_sample); } av_add_index_entry(vst, pos + asize, i, vsize, 0, AVINDEX_KEYFRAME); } -- 2.34.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".