From patchwork Sun Jul 2 20:03:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Azamat H. Hackimov" X-Patchwork-Id: 4190 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.1.76 with SMTP id 73csp8533025vsb; Sun, 2 Jul 2017 13:09:04 -0700 (PDT) X-Received: by 10.28.111.215 with SMTP id c84mr22616623wmi.72.1499026144072; Sun, 02 Jul 2017 13:09:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499026144; cv=none; d=google.com; s=arc-20160816; b=Lm/zdw0JXoL5jx9jzCjIJEdCNGGsB1OO5vzjhcKOHIO0HwCKbxYOq8uZeBKrVhFmLG phG/z45VoODSe6gvty/Tjy5bwQwHgpsvnrPipbV8rjSqzc6dipYQe9HEtsUZFlgtURIa zm1FmjG+NNZQ0FeKoYSsgbVZeK3/8W0A/LVOrmORW+CV1bi/IXDd2scFOfNJFa8i6bbk gxVUa5XMh/7jdOzKj0ZmfJb26l/j3J+317Dq86pe4abTF2xEN81wQ+6r9EJv6nhBVAnx jtEw4YHT99yfB92XT2qm4WxANkBYxcXfXug7cuH8WyJG+ZJbq9v6aZ2Nmk1FuAE7oypL /A4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=cmQSDhbSLnFelcpGYyI9NeAzR/GHDfz5X6HIk6NFFGo=; b=VA+ZUbJhUWmY9F0tu+Oa385g0LCvu6GzxVUQ4sTf6/0A/106Jo+5zlo7D8/Yrms9qx CcfrE+/ruLe7Pxtbu46uP2/wRTKrJ1S90tlLOICAwTA1IeDHiW3q8DLj3sLG/6NmN/HA d1QeEgMc0Zh0XTM8+LA8AyCBB3fE8GeOzKRK1MhZ9rTGBEiCiyyoHm36N6oQxZsxDQtR BwHDKWQCnzB/svwPiQw4GbL9wKqwOPfbfz3GD/Gx4Ry2o8jxGASnHf9cXDV2CD3hr68t KS+4r766kVm+U7L4kX/XrDcjqS8cJAWWydY1V2/IHZBzC5SBYEzyUkIRr92+B9BY2kAB vt5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.b=dpwRT40Q; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4si16108456wmz.182.2017.07.02.13.09.03; Sun, 02 Jul 2017 13:09:04 -0700 (PDT) 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; dkim=neutral (body hash did not verify) header.i=@gmail.com header.b=dpwRT40Q; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id ED460680B28; Sun, 2 Jul 2017 23:08:58 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lf0-f42.google.com (mail-lf0-f42.google.com [209.85.215.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7BBDD680533 for ; Sun, 2 Jul 2017 23:08:52 +0300 (EEST) Received: by mail-lf0-f42.google.com with SMTP id l13so92706006lfl.1 for ; Sun, 02 Jul 2017 13:08:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=AWyLHrrxZ3MLPAubvpXTBA19GPkuvKRj6CDemoQRQTI=; b=dpwRT40QJ5EumqMS/A35Y1wBhTYQ6bhJbrT9Zklu1BQRDTSyHbEJUlu9PKksMCY90K wI8w9vKVYMGOQLQvHpaAOVM0n3M+zBr1RRr4zCVzcjMKJ5+3nvnLK2GuQU8MWkTpjOmr Wt+G4mUiFCWJ4Ut8Y+TkBhfexzyTS86+KZ/GmrdduoiOk9T/r+FkKMVMNhBdFHrT9sdO gPRqHyBqWrYNInwmh/MOgbgRSVSupsZSNAi4lKDrn1HQk6RGwmxNGe0KmJ8dJ5WtK4FC UbSoAR6wHH81pe6mte8+E2jk7S4SMai07n0Ng7SSjc6uuz5vCCnC/yL5SQuMdVaWhUAG pXWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=AWyLHrrxZ3MLPAubvpXTBA19GPkuvKRj6CDemoQRQTI=; b=tN6TixP7pbvufpwn5uS0R2DpsQXBUTOTjwEjCcyJRNlSK/0pUhO3Gw6KaHnyXfMRwp 2E5pf+qBiv5PEXBdW7L+5E9Ft3yU+sxM325L28gW+oEv+moUzstyFE7jz38gKiYRShgt CN+8GDM2EH/srfFabDXGpyadiI4IGwff08GQ+CfZPiS/5xIYCx7V5Z6ARKjmg0QnByY2 aGkbm4CeniWmZqcbnDyLdxk7LdYMBVyWyUAC/dZ3EvYhlh2CcIDli11TsxrEP3nXIxZ+ 68Zeg+bBM03WYoUZQ/mbB+lDslBeKyarSusFytr/SGpcuc081+PyuxboBJ4t9pXObSgL HxMg== X-Gm-Message-State: AIVw110dKc/iKkomdQ/IzjsLjbPVKhN4QRi7M8ArwwWcOzJYN1iFtTFK 2WlEna97VYrQpC1W X-Received: by 10.25.169.82 with SMTP id s79mr865335lfe.173.1499025812983; Sun, 02 Jul 2017 13:03:32 -0700 (PDT) Received: from localhost.localdomain ([2a02:1c8:101:ffb:56a0:50ff:fe7d:1bd2]) by smtp.gmail.com with ESMTPSA id j12sm2719968lfh.23.2017.07.02.13.03.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 02 Jul 2017 13:03:32 -0700 (PDT) From: "Azamat H. Hackimov" To: ffmpeg-devel@ffmpeg.org Date: Mon, 3 Jul 2017 01:03:27 +0500 Message-Id: <20170702200327.9198-1-azamat.hackimov@gmail.com> X-Mailer: git-send-email 2.13.0 Subject: [FFmpeg-devel] [PATCH] libavformat/gdv: Fix parsing for soundless video 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: "Azamat H. Hackimov" MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Added 2 byte skipping if there no sound present, that fixes playback files without sound stream. --- libavformat/gdv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/gdv.c b/libavformat/gdv.c index 90692bd61c..32209320a7 100644 --- a/libavformat/gdv.c +++ b/libavformat/gdv.c @@ -107,6 +107,8 @@ static int gdv_read_header(AVFormatContext *ctx) gdv->audio_size = (ast->codecpar->sample_rate / fps) * ast->codecpar->channels * (1 + !!(snd_flags & 4)) / (1 + !!(snd_flags & 8)); gdv->is_audio = 1; + } else { + avio_skip(pb, 2); } vid_depth = avio_rl16(pb); avio_skip(pb, 4);