From patchwork Thu Apr 4 07:12:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Belkner X-Patchwork-Id: 12610 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 3F2FC447BF1 for ; Thu, 4 Apr 2019 10:12:32 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1D3B168ABF6; Thu, 4 Apr 2019 10:12:32 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from longisland.ops.eusc.inter.net (longisland.ops.eusc.inter.net [84.23.254.153]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8571368ABB5 for ; Thu, 4 Apr 2019 10:12:25 +0300 (EEST) X-Trace: 507c7062656c6b6e657240736e6166752e64657c38342e3137332e3232332e3339 7c3168427758722d3030304248792d33767c31353534333631393339 Received: from longisland.ops.eusc.inter.net ([10.153.10.19] helo=localhost) by longisland.ops.eusc.inter.net with esmtpsa (Exim 4.92) id 1hBwXr-000BHy-3v; Thu, 04 Apr 2019 09:12:20 +0200 To: FFmpeg development discussions and patches , "mypopy@gmail.com" References: <9918cb96-3ce2-e1fa-77f1-7ac8a911170b@snafu.de> From: Peter Belkner Message-ID: Date: Thu, 4 Apr 2019 09:12:14 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-SA-Exim-Connect-IP: 84.173.223.39 X-SA-Exim-Mail-From: pbelkner@snafu.de X-SA-Exim-Scanned: No (on longisland.ops.eusc.inter.net); SAEximRunCond expanded to false X-Content-Filtered-By: Mailman/MimeDel 2.1.20 Subject: Re: [FFmpeg-devel] Patch for Reproducing Issue 7827 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: Petter Reinholdtsen Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" On 04.04.2019 08:49, mypopy@gmail.com wrote: > On Thu, Apr 4, 2019 at 2:33 PM Peter Belkner wrote: >> This patch does not improve or fix something instead it is meant for >> easily reproducing issue 7827 (as requested, cf. >> https://trac.ffmpeg.org/ticket/7827). I've to admit that I don't know >> how to produce a patch by "git format-patch" instead it was made by "git >> diff > muxing.patch". >> > A lot of docs for this type question, this is a refer > https://www.x.org/wiki/Development/Documentation/SubmittingPatches/ > > You can used the command like: > > git format-patch HEAD~1 # create a patch for the last commit > > And I think "git diff > muxing.patch" will drop the commit message, > it's a part of the patch for review, Tks. > > _______________________________________________ > 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". The patch produced with your command is attached. This is *not* the patch I want to provide. Just believe me: I'm able to search the internet myself and luckily finally found https://stackoverflow.com/questions/5159185/create-a-git-patch-from-the-changes-in-the-current-working-directory. BTW: I already spend hours to narrow this issue to libavformat. Just eat the provided patch either from the issue itself (cf. https://trac.ffmpeg.org/ticket/7827) or from this mailing list OR LET IT BE. Cheers. From ee16d14b0a29317f6118a209c4d0737b97b7f58f Mon Sep 17 00:00:00 2001 From: James Almer Date: Mon, 25 Mar 2019 00:27:23 -0300 Subject: [PATCH] avcodec/av1_metadata: add an option to remove Padding OBUs Reviewed-by: Mark Thompson Signed-off-by: James Almer --- doc/bitstream_filters.texi | 3 +++ libavcodec/av1_metadata_bsf.c | 19 +++++++++++++++++++ libavcodec/version.h | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/doc/bitstream_filters.texi b/doc/bitstream_filters.texi index 076b910e40..25bbf8372b 100644 --- a/doc/bitstream_filters.texi +++ b/doc/bitstream_filters.texi @@ -87,6 +87,9 @@ the timing info in the sequence header. Set the number of ticks in each picture, to indicate that the stream has a fixed framerate. Ignored if @option{tick_rate} is not also set. +@item delete_padding +Deletes Padding OBUs. + @end table @section chomp diff --git a/libavcodec/av1_metadata_bsf.c b/libavcodec/av1_metadata_bsf.c index 2b74b697e4..fe208feaf5 100644 --- a/libavcodec/av1_metadata_bsf.c +++ b/libavcodec/av1_metadata_bsf.c @@ -46,6 +46,8 @@ typedef struct AV1MetadataContext { AVRational tick_rate; int num_ticks_per_picture; + + int delete_padding; } AV1MetadataContext; @@ -158,6 +160,19 @@ static int av1_metadata_filter(AVBSFContext *bsf, AVPacket *out) } } + if (ctx->delete_padding) { + for (i = 0; i < frag->nb_units; i++) { + if (frag->units[i].type == AV1_OBU_PADDING) { + err = ff_cbs_delete_unit(ctx->cbc, frag, i); + if (err < 0) { + av_log(bsf, AV_LOG_ERROR, "Failed to delete Padding OBU.\n"); + goto fail; + } + --i; + } + } + } + err = ff_cbs_write_packet(ctx->cbc, out, frag); if (err < 0) { av_log(bsf, AV_LOG_ERROR, "Failed to write packet.\n"); @@ -275,6 +290,10 @@ static const AVOption av1_metadata_options[] = { OFFSET(num_ticks_per_picture), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, FLAGS }, + { "delete_padding", "Delete all Padding OBUs", + OFFSET(delete_padding), AV_OPT_TYPE_BOOL, + { .i64 = 0 }, 0, 1, FLAGS}, + { NULL } }; diff --git a/libavcodec/version.h b/libavcodec/version.h index d1cd356524..02cb5c3ec1 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,7 +29,7 @@ #define LIBAVCODEC_VERSION_MAJOR 58 #define LIBAVCODEC_VERSION_MINOR 48 -#define LIBAVCODEC_VERSION_MICRO 100 +#define LIBAVCODEC_VERSION_MICRO 101 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \