diff mbox

[FFmpeg-devel] avformat/utils: add support for reading ID3 tags at start of wav

Message ID 20181212182600.20122-1-onemda@gmail.com
State Accepted
Commit 102c11745e2da4e3ca248c6faed499bb2af19bd5
Headers show

Commit Message

Paul B Mahol Dec. 12, 2018, 6:26 p.m. UTC
Fixes #4140.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
---
 libavformat/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tomas Härdin Dec. 13, 2018, 2:16 p.m. UTC | #1
ons 2018-12-12 klockan 19:26 +0100 skrev Paul B Mahol:
> Fixes #4140.
> 
> > Signed-off-by: Paul B Mahol <onemda@gmail.com>
> ---
>  libavformat/utils.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/utils.c b/libavformat/utils.c
> index 93e588ee1e..7afef545fe 100644
> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -646,7 +646,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
>  
>      if (id3v2_extra_meta) {
>          if (!strcmp(s->iformat->name, "mp3") || !strcmp(s->iformat->name, "aac") ||
> -            !strcmp(s->iformat->name, "tta")) {
> +            !strcmp(s->iformat->name, "tta") || !strcmp(s->iformat->name, "wav")) {
>              if ((ret = ff_id3v2_parse_apic(s, &id3v2_extra_meta)) < 0)
>                  goto fail;
>              if ((ret = ff_id3v2_parse_chapters(s, &id3v2_extra_meta)) < 0)


Could this be generalized? Checking for specific demuxers seems a bit
off..

/Tomas
diff mbox

Patch

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 93e588ee1e..7afef545fe 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -646,7 +646,7 @@  FF_ENABLE_DEPRECATION_WARNINGS
 
     if (id3v2_extra_meta) {
         if (!strcmp(s->iformat->name, "mp3") || !strcmp(s->iformat->name, "aac") ||
-            !strcmp(s->iformat->name, "tta")) {
+            !strcmp(s->iformat->name, "tta") || !strcmp(s->iformat->name, "wav")) {
             if ((ret = ff_id3v2_parse_apic(s, &id3v2_extra_meta)) < 0)
                 goto fail;
             if ((ret = ff_id3v2_parse_chapters(s, &id3v2_extra_meta)) < 0)