From patchwork Thu Mar 28 17:34:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gyan Doshi X-Patchwork-Id: 12521 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 F36CB44914B for ; Thu, 28 Mar 2019 19:34:24 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D3A5B68A990; Thu, 28 Mar 2019 19:34:24 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mx1.mailbox.org (mx1.mailbox.org [80.241.60.212]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 44C5768A8B8 for ; Thu, 28 Mar 2019 19:34:17 +0200 (EET) Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:105:465:1:1:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id AF52E4C9B0 for ; Thu, 28 Mar 2019 18:34:16 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter01.heinlein-hosting.de (spamfilter01.heinlein-hosting.de [80.241.56.115]) (amavisd-new, port 10030) with ESMTP id Lk7jXT81h9HX for ; Thu, 28 Mar 2019 18:34:04 +0100 (CET) To: FFmpeg development discussions and patches From: Gyan Message-ID: Date: Thu, 28 Mar 2019 23:04:01 +0530 MIME-Version: 1.0 Content-Language: en-US Subject: [FFmpeg-devel] [PATCH] lavf/mov: skip extradata check in esds for MPEG-1/2 audio 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" From 7e10e1c58e69137487ff0da85caf1c350b3262ae Mon Sep 17 00:00:00 2001 From: Gyan Doshi Date: Thu, 28 Mar 2019 22:59:30 +0530 Subject: [PATCH] lavf/mov: skip extradata check in esds for MPEG-1/2 audio As per 14496-3 9.D.2.2, it's not defined for these audio object types. Fixes #7817. --- libavformat/isom.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/isom.c b/libavformat/isom.c index 0a4d901be5..4358dc4a6a 100644 --- a/libavformat/isom.c +++ b/libavformat/isom.c @@ -534,6 +534,10 @@ FF_ENABLE_DEPRECATION_WARNINGS len = ff_mp4_read_descr(fc, pb, &tag); if (tag == MP4DecSpecificDescrTag) { av_log(fc, AV_LOG_TRACE, "Specific MPEG-4 header len=%d\n", len); + /* As per 14496-3:2009 9.D.2.2, No decSpecificInfo is defined + for MPEG-1 Audio or MPEG-2 Audio; MPEG-2 AAC excluded. */ + if (object_type_id == 0x69 || object_type_id == 0x6b) + return 0; if (!len || (uint64_t)len > (1<<30)) return AVERROR_INVALIDDATA; if ((ret = ff_get_extradata(fc, st->codecpar, pb, len)) < 0)