[FFmpeg-devel] [PATCH 1/2] avcodec/{ass, webvttdec}: fix handling of backslashes

Soft Works softworkz at hotmail.com
Wed Feb 2 06:44:54 EET 2022



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of Oneric
> Sent: Wednesday, February 2, 2022 12:26 AM
> To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH 1/2] avcodec/{ass, webvttdec}: fix
> handling of backslashes
> 
> On Tue, Feb 01, 2022 at 20:41:37 +0000, Soft Works wrote:
> > > On Tue, Feb 01, 2022 at 19:44:24 +0000, Soft Works wrote:
> > > > > On Sun, Jan 16, 2022 at 19:16:54 +0100, Oneric wrote:
> > > > >
> > > > > In case anyone is wondering why patchwork fails to apply the second
> patch,
> > > > > this is probably once again because the patch updates one of FATE's
> ASS
> > > > > reference files which use CRLF line-endings.
> > > > > Locally git am applies both without a hitch for me on top of current
> master
> > > > > (and FATE passes after applying each patch).
> > > >
> > > >
> > > > You can add a .gitattributes file to tests/ref/fate/ which includes the
> line
> > > >
> > > > sub-webvtt2 -diff
> > > >
> > > > Then your local git format-patch will create a binary diff for the
> file.
> > >
> > > Thanks for your suggestion. However, a binary diff would look like this
> which
> > > isn't great for seeing what's going on during review:
> > >
> > >   [...]
> >
> > Yes, I know, but the question is probably what's more important..
> >
> > ..that it can be applied or that the text is viewable?
> 
> It CAN be applied (as I've now written twice) and
> of course I verified this with the mail received from the list.

I meant that it can be applied by everybody, including Patchwork
and Michael. 

> If you tried to send a patch with your mail client by pasting in the diff,
> then yes, presumably the line-endings would indeed get mangled.

I use git format-patch, just like many others and afaik it can't create base64 
encoded content.

BTW. BASE64 doesn't seem to be widely used here, just checked the frequent 
committers among the recent submissions. just quickly checked Michael,
Andreas,Gyan,Marton,James,Anton,Derek - all of

> [..] That's why 
> doc/developer.texi tells you not to do this (instead recommending
> git send-email or binary (i.e. base64-encoded) attachments).

Interestingly, even the author of those lines is sending patches with 
Content-Transfer-Encoding: 7bit :-)


> Tl;dr:
> Mixed line-endings in a diff are no technical issue,
> provided the patch is sent correctly.^

LOL - so the majority on this ML is sending patches incorrectly?
I think, marking such files as binary is a bit more practical than 
expecting everybody to change ones working process. 

Best,
softworkz




More information about the ffmpeg-devel mailing list