From patchwork Thu Mar 9 14:45:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wm4 X-Patchwork-Id: 2858 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.50.79 with SMTP id y76csp363685vsy; Thu, 9 Mar 2017 06:45:44 -0800 (PST) X-Received: by 10.28.113.9 with SMTP id m9mr29905216wmc.60.1489070744288; Thu, 09 Mar 2017 06:45:44 -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 b84si4614636wmh.133.2017.03.09.06.45.43; Thu, 09 Mar 2017 06:45:44 -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; dkim=neutral (body hash did not verify) header.i=@googlemail.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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 26CB668837F; Thu, 9 Mar 2017 16:45:16 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 208E2688372 for ; Thu, 9 Mar 2017 16:45:09 +0200 (EET) Received: by mail-wm0-f66.google.com with SMTP id u132so11282292wmg.1 for ; Thu, 09 Mar 2017 06:45:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=QxyDyDvnCvEy3fmuP5Tz9mpAjaFz4G+O0xO2srbuQWQ=; b=d1SkWl8SPnu295bFFfUnR89imQic2ID4fiYfTg0G8xWGi5pDfzKxdUE1Y/5ybHyhMz m2USZCP8Pu41mMDVAZDvTPxPf/dkQ3YMHuQUE70r8HLxHfMfaXttxPzIQeOhUEzsMTB9 oN9jo+0SNVAPs4ct6R/LmKK0guGgiT6xTWr/nbE2onnzzB/hdpGDEFMBrV7LpkGA2czS BbZ4XyGH1oYJVQNMozP4IJVvh9cj9npyouuVrYiB9h9NuH1TbcfahfYxkh1pLDOUmI6u hWzwEmbCwIuGHlKRqLY6rYtGjrr0paSPs7yZdSAY7gL4prOHjI+1DqV74ehHGR78H5Mg IEfg== 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:in-reply-to :references; bh=QxyDyDvnCvEy3fmuP5Tz9mpAjaFz4G+O0xO2srbuQWQ=; b=cvo+itN4QOsEkqbCVcpVKGbyf5W7HCx2etKGXcC/zteA0grn0Hzxew3H58ojfwXfCz MpwJKMNKsESB9lQzp1xeBdE9TxE6kShB2Tqn0ArcFCx7uJEgrec+azhT4u4s8kd25h3b pc4K3wmKYTV5HUkvWSMH82HL9GgoJQ/AojPSA/+qyoDjbbUn18L9KId/d/SHq1Rhj8Ov 8wrySpPj0Px22lGOjItysYbfOD1h74zsxGpsE8CXN8t7sAWuhmiU7Ng1NWwKpI+cT98y mVZ9mspEQoiXVaiLJa+4FzUl2IL2+9ORGGhS9hzAZ/67203BlLXUmriTuf8pUYIELjZx cn1Q== X-Gm-Message-State: AMke39lkX9zldiZNyYwagEhA8nKPIpbMt1sSWTTXo2gf1FPXthtqZqR31t5o/G01aqwiMQ== X-Received: by 10.28.47.7 with SMTP id v7mr27037088wmv.138.1489070722644; Thu, 09 Mar 2017 06:45:22 -0800 (PST) Received: from localhost.localdomain (p4FF00D85.dip0.t-ipconnect.de. [79.240.13.133]) by smtp.googlemail.com with ESMTPSA id c58sm8526201wrc.9.2017.03.09.06.45.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Mar 2017 06:45:21 -0800 (PST) From: wm4 To: ffmpeg-devel@ffmpeg.org Date: Thu, 9 Mar 2017 15:45:19 +0100 Message-Id: <20170309144519.14212-3-nfxjfg@googlemail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170309144519.14212-1-nfxjfg@googlemail.com> References: <20170309144519.14212-1-nfxjfg@googlemail.com> Subject: [FFmpeg-devel] [PATCH 3/3] ffmpeg, ffprobe: don't "merge" side data into packet data by default 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: wm4 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Preparation for potentially disabling merged side data by default in the libs. Do this in particular because it affects fate tests. The changed tests either reflect added packet side data, or the changed packet size due to merged side data removal reducing the packet size. The previous patches are needed because there is apparently no other way for ffmpeg.c to pass the flag down to sub demuxers without potentially overriding command line settings. --- ffmpeg_opt.c | 2 + ffprobe.c | 8 ++ libavformat/tests/seek.c | 2 + tests/ref/fate/concat-demuxer-simple2-lavf-ts | 192 +++++++++++++++++--------- tests/ref/fate/gaplessenc-itunes-to-ipod-aac | 4 +- tests/ref/fate/gaplessenc-pcm-to-mov-aac | 4 +- tests/ref/fate/gaplessinfo-itunes1 | 4 +- tests/ref/fate/gaplessinfo-itunes2 | 4 +- tests/ref/fate/mov-aac-2048-priming | 3 +- tests/ref/seek/cache-pipe | 10 +- tests/ref/seek/extra-mp3 | 18 +-- tests/ref/seek/lavf-ts | 54 ++++---- tests/ref/seek/mkv-codec-delay | 14 +- 13 files changed, 198 insertions(+), 121 deletions(-) diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c index e2c0176e14..fc885dfac3 100644 --- a/ffmpeg_opt.c +++ b/ffmpeg_opt.c @@ -927,6 +927,7 @@ static int open_input_file(OptionsContext *o, const char *filename) print_error(filename, AVERROR(ENOMEM)); exit_program(1); } + ic->flags |= AVFMT_FLAG_KEEP_SIDE_DATA; if (o->nb_audio_sample_rate) { av_dict_set_int(&o->g->format_opts, "sample_rate", o->audio_sample_rate[o->nb_audio_sample_rate - 1].u.i, 0); } @@ -1912,6 +1913,7 @@ static int read_ffserver_streams(OptionsContext *o, AVFormatContext *s, const ch int i, err; AVFormatContext *ic = avformat_alloc_context(); + ic->flags |= AVFMT_FLAG_KEEP_SIDE_DATA; ic->interrupt_callback = int_cb; err = avformat_open_input(&ic, filename, NULL, NULL); if (err < 0) diff --git a/ffprobe.c b/ffprobe.c index c85c3a104b..c3b010388d 100644 --- a/ffprobe.c +++ b/ffprobe.c @@ -2575,6 +2575,14 @@ static int open_input_file(InputFile *ifile, const char *filename) AVDictionary **opts; int scan_all_pmts_set = 0; + fmt_ctx = avformat_alloc_context(); + if (!fmt_ctx) { + print_error(filename, AVERROR(ENOMEM)); + exit_program(1); + } + + fmt_ctx->flags |= AVFMT_FLAG_KEEP_SIDE_DATA; + if (!av_dict_get(format_opts, "scan_all_pmts", NULL, AV_DICT_MATCH_CASE)) { av_dict_set(&format_opts, "scan_all_pmts", "1", AV_DICT_DONT_OVERWRITE); scan_all_pmts_set = 1; diff --git a/libavformat/tests/seek.c b/libavformat/tests/seek.c index 7ed56ba4ef..5cf3a123e3 100644 --- a/libavformat/tests/seek.c +++ b/libavformat/tests/seek.c @@ -67,6 +67,8 @@ int main(int argc, char **argv) int frame_count = 1; int duration = 4; + ic->flags |= AVFMT_FLAG_KEEP_SIDE_DATA; + for(i=2; i