[FFmpeg-devel] [PATCH v23 16/21] avfilter/textmod: Add textmod, censor and show_speaker filters

Soft Works softworkz at hotmail.com
Sat Dec 11 20:15:36 EET 2021



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of Michael
> Niedermayer
> Sent: Saturday, December 11, 2021 6:03 PM
> To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH v23 16/21] avfilter/textmod: Add textmod,
> censor and show_speaker filters
> 
> On Sat, Dec 11, 2021 at 04:24:14PM +0000, Soft Works wrote:
> >
> >
> > > -----Original Message-----
> > > From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of Michael
> > > Niedermayer
> > > Sent: Saturday, December 11, 2021 4:33 PM
> > > To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
> > > Subject: Re: [FFmpeg-devel] [PATCH v23 16/21] avfilter/textmod: Add
> textmod,
> > > censor and show_speaker filters
> > >
> > > On Fri, Dec 10, 2021 at 09:37:53PM +0000, Soft Works wrote:
> > > > - textmod {S -> S)
> > > >   Modify subtitle text in a number of ways
> > > >
> > > > - censor {S -> S)
> > > >   Censor subtitles using a word list
> > > >
> > > > - show_speaker {S -> S)
> > > >   Prepend speaker names from ASS subtitles to the visible text lines
> > > >
> > > > Signed-off-by: softworkz <softworkz at hotmail.com>
> > > > ---
> > > >  doc/filters.texi         | 206 ++++++++++++
> > > >  libavfilter/Makefile     |   5 +
> > > >  libavfilter/allfilters.c |   3 +
> > > >  libavfilter/sf_textmod.c | 697 +++++++++++++++++++++++++++++++++++++++
> > > >  4 files changed, 911 insertions(+)
> > > >  create mode 100644 libavfilter/sf_textmod.c
> > >
> > > doesnt apply (using git am with the email, the other patches
> > > with lower numbers all applied with no such issues)
> > >
> > > Applying: avfilter/textmod: Add textmod, censor and show_speaker filters
> > > .git/rebase-apply/patch:269: trailing whitespace.
> > > /*
> > > .git/rebase-apply/patch:270: trailing whitespace.
> > >  * Copyright (c) 2021 softworkz
> > > .git/rebase-apply/patch:271: trailing whitespace.
> > >  *
> > > .git/rebase-apply/patch:272: trailing whitespace.
> > >  * This file is part of FFmpeg.
> > > .git/rebase-apply/patch:273: trailing whitespace.
> > >  *
> > > warning: squelched 692 whitespace errors
> > > warning: 697 lines add whitespace errors.
> > > Using index info to reconstruct a base tree...
> > > M	libavfilter/Makefile
> > > M	libavfilter/allfilters.c
> > > .git/rebase-apply/patch:269: trailing whitespace.
> > > /*
> > > .git/rebase-apply/patch:270: trailing whitespace.
> > >  * Copyright (c) 2021 softworkz
> > > .git/rebase-apply/patch:271: trailing whitespace.
> > >  *
> > > .git/rebase-apply/patch:272: trailing whitespace.
> > >  * This file is part of FFmpeg.
> > > .git/rebase-apply/patch:273: trailing whitespace.
> > >  *
> > > error: patch failed: doc/filters.texi:25644
> > > error: doc/filters.texi: patch does not apply
> > > error: patch failed: libavfilter/Makefile:553
> > > error: libavfilter/Makefile: patch does not apply
> > > error: patch failed: libavfilter/allfilters.c:544
> > > error: libavfilter/allfilters.c: patch does not apply
> > > error: Did you hand edit your patch?
> > > It does not apply to blobs recorded in its index.
> > > Patch failed at 0001 avfilter/textmod: Add textmod, censor and
> show_speaker
> > > filters
> > > Use 'git am --show-current-patch' to see the failed patch
> > > When you have resolved this problem, run "git am --continue".
> > > If you prefer to skip this patch, run "git am --skip" instead.
> > > To restore the original branch and stop patching, run "git am --abort".
> > >
> > > [...]
> > > --
> >
> >
> > Hi Michael,
> >
> > I have no idea what is going on here.
> >
> > When I look at those lines in the file that was generated
> > by git format-patch, there isn't any trailing white space.
> > Same is true when I look at this e-mail as I have received
> > it from the ML, and when downloading the M-Box from patchwork,
> > it hasn't any trailing whitespace either.
> >
> > There are lines with a single space between hunks,
> > but all files generated by git format-patch have that.
> > I have double-checked all involved source files and none of them
> > has any trailing white space anymore.
> >
> > Yesterday, Andreas had pointed out the whitespace messages
> > would only be warnings, but then I wouldn't know what's
> > causing this, as it doesn't seem to be a line ending issue
> > either. Patchwork could apply it, interestingly.
> 
> patchwork uses different code to apply patches we already determined this
> last time.
> 
> heres what patch does:
> 
> patch -p1 --dry-run <.git/rebase-apply/patch
> (Stripping trailing CRs from patch; use --binary to disable.)
> checking file doc/filters.texi
> (Stripping trailing CRs from patch; use --binary to disable.)
> checking file libavfilter/Makefile
> Hunk #1 succeeded at 554 (offset 1 line).
> (Stripping trailing CRs from patch; use --binary to disable.)
> checking file libavfilter/allfilters.c
> Hunk #1 succeeded at 545 (offset 1 line).
> (Stripping trailing CRs from patch; use --binary to disable.)
> checking file libavfilter/sf_textmod.c
> 
> it applies it but it still complains about issues, OTOH git am
> refuses this.
> also using --binary patch also refuses this
> 
> patch -p1 --dry-run --binary <.git/rebase-apply/patch
> checking file doc/filters.texi
> Hunk #1 FAILED at 25644 (different line endings).
> Hunk #2 FAILED at 25811 (different line endings).
> 2 out of 2 hunks FAILED
> checking file libavfilter/Makefile
> Hunk #1 FAILED at 553 (different line endings).
> 1 out of 1 hunk FAILED
> checking file libavfilter/allfilters.c
> Hunk #1 FAILED at 544 (different line endings).
> 1 out of 1 hunk FAILED
> checking file libavfilter/sf_textmod.c
> 
> I dont want all of a sudden random files to change their cr/lf line endings
> which this is smelling like it could result in
> 
> 
> >
> > I have attached the full patchset as zip. Hopefully this will
> > apply at least.
> 
> please provide a git repository, github or whatever, working with attached
> zip files is not reasonable when it involves repeatedly sent patchsets


This is a fresh fork to which I pushed my v32 subtitles branch:

https://github.com/softworkz/FFmpeg/tree/subs_v23


And this one additionally has the dvbsubdec fix and the fix for hard-space parsing
which patchwork didn't take (due to mixed line endings).

https://github.com/softworkz/FFmpeg/tree/subs_v23_plus


Thanks again,
softworkz




More information about the ffmpeg-devel mailing list