diff mbox series

[FFmpeg-devel] libavformat/oggparsevorbis: Use case-insensitive key compare for vorbis picture

Message ID 20200411094625.7677-1-mattias.wadman@gmail.com
State New
Headers show
Series [FFmpeg-devel] libavformat/oggparsevorbis: Use case-insensitive key compare for vorbis picture | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Mattias Wadman April 11, 2020, 9:46 a.m. UTC
Regression since 8d3630c5402fdda2889fe4f74f7dcdd50ebca654 where keys were changed
to not be touppered but the picture block strcmp was not changed to be case-insensitive.
---
 libavformat/oggparsevorbis.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Carl Eugen Hoyos April 11, 2020, 10:58 a.m. UTC | #1
Am Sa., 11. Apr. 2020 um 11:53 Uhr schrieb Mattias Wadman
<mattias.wadman@gmail.com>:
>
> Regression since 8d3630c5402fdda2889fe4f74f7dcdd50ebca654 where keys were changed
> to not be touppered but the picture block strcmp was not changed to be case-insensitive.
> ---
>  libavformat/oggparsevorbis.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git libavformat/oggparsevorbis.c libavformat/oggparsevorbis.c
> index 8dd27e7770..27d2c686b6 100644
> --- libavformat/oggparsevorbis.c
> +++ libavformat/oggparsevorbis.c
> @@ -151,7 +151,7 @@ int ff_vorbis_comment(AVFormatContext *as, AVDictionary **m,
>               * 'METADATA_BLOCK_PICTURE'. This is the preferred and
>               * recommended way of embedding cover art within VorbisComments."
>               */
> -            if (!strcmp(tt, "METADATA_BLOCK_PICTURE") && parse_picture) {
> +            if (!av_strcasecmp(tt, "METADATA_BLOCK_PICTURE") && parse_picture) {
>                  int ret, len = AV_BASE64_DECODE_SIZE(vl);
>                  char *pict = av_malloc(len);

For future patches:
I have no idea how you created this but my git didn't like it.

Patch applied, thank you!

Carl Eugen
Mattias Wadman April 11, 2020, 11:13 a.m. UTC | #2
Thanks!

Strange, bash history says:
git format-patch --to=ffmpeg-devel@ffmpeg.org HEAD~..HEAD
git send-email *.patch

But i do have this gitconfig:
[diff]
noprefix = true

Seems format-patch uses it That was unexpected, removing that config.

-Mattias

On Sat, Apr 11, 2020 at 12:59 PM Carl Eugen Hoyos <ceffmpeg@gmail.com>
wrote:

> Am Sa., 11. Apr. 2020 um 11:53 Uhr schrieb Mattias Wadman
> <mattias.wadman@gmail.com>:
> >
> > Regression since 8d3630c5402fdda2889fe4f74f7dcdd50ebca654 where keys
> were changed
> > to not be touppered but the picture block strcmp was not changed to be
> case-insensitive.
> > ---
> >  libavformat/oggparsevorbis.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git libavformat/oggparsevorbis.c libavformat/oggparsevorbis.c
> > index 8dd27e7770..27d2c686b6 100644
> > --- libavformat/oggparsevorbis.c
> > +++ libavformat/oggparsevorbis.c
> > @@ -151,7 +151,7 @@ int ff_vorbis_comment(AVFormatContext *as,
> AVDictionary **m,
> >               * 'METADATA_BLOCK_PICTURE'. This is the preferred and
> >               * recommended way of embedding cover art within
> VorbisComments."
> >               */
> > -            if (!strcmp(tt, "METADATA_BLOCK_PICTURE") && parse_picture)
> {
> > +            if (!av_strcasecmp(tt, "METADATA_BLOCK_PICTURE") &&
> parse_picture) {
> >                  int ret, len = AV_BASE64_DECODE_SIZE(vl);
> >                  char *pict = av_malloc(len);
>
> For future patches:
> I have no idea how you created this but my git didn't like it.
>
> Patch applied, thank you!
>
> Carl Eugen
> _______________________________________________
> 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".
diff mbox series

Patch

diff --git libavformat/oggparsevorbis.c libavformat/oggparsevorbis.c
index 8dd27e7770..27d2c686b6 100644
--- libavformat/oggparsevorbis.c
+++ libavformat/oggparsevorbis.c
@@ -151,7 +151,7 @@  int ff_vorbis_comment(AVFormatContext *as, AVDictionary **m,
              * 'METADATA_BLOCK_PICTURE'. This is the preferred and
              * recommended way of embedding cover art within VorbisComments."
              */
-            if (!strcmp(tt, "METADATA_BLOCK_PICTURE") && parse_picture) {
+            if (!av_strcasecmp(tt, "METADATA_BLOCK_PICTURE") && parse_picture) {
                 int ret, len = AV_BASE64_DECODE_SIZE(vl);
                 char *pict = av_malloc(len);