Menu

#436 cuesheet: ISRC with quoted value fails parsing

1.3.x
closed-fixed
Erik
None
5
2016-04-26
2016-02-18
hhm0
No

Used cdrdao to generate a toc, which had entries like so...

CD_TEXT {
  LANGUAGE 0 {
    TITLE "<title>"
    PERFORMER ""
    ISRC "<isrc>"
  }
}

...per track, instead of...

ISRC "<isrc>"
CD_TEXT {
  LANGUAGE 0 {
    TITLE "<title>"
    PERFORMER ""
  }
}

cueconvert generated a quoted ISRC field, like...

ISRC "<isrc>"

...instead of...

ISRC <isrc>

...(without quotes).

This caused "metaflac --import-cuesheet-from" and "flac --cuesheet" to return an error like so:

file.flac: ERROR: while parsing cuesheet "file.cue" on line 9: invalid ISRC number

Removing the quotes from the ISRC values with...
sed -e 's/ISRC "([^"]*)"/ISRC \1/g'
...makes the cuesheet tagging work fine.

I suppose that quoted ISRC values should be parsed without error; see https://sourceforge.net/p/flac/bugs/100/.

Thanks for the wonderful program, works awesomely besides for this! :-)

Discussion

  • Erik

    Erik - 2016-02-21
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,5 +1,6 @@
     Used cdrdao to generate a toc, which had entries like so...
    
    +~~~~
     CD_TEXT {
       LANGUAGE 0 {
         TITLE "<title>"
    @@ -7,9 +8,11 @@
         ISRC "<isrc>"
       }
     }
    +~~~~
    
     ...per track, instead of...
    
    +~~~~
     ISRC "<isrc>"
     CD_TEXT {
       LANGUAGE 0 {
    @@ -17,14 +20,22 @@
         PERFORMER ""
       }
     }
    +~~~~
    +
    
     cueconvert generated a quoted ISRC field, like...
    
    +~~~~
     ISRC "<isrc>"
    +~~~~
    +
    
     ...instead of...
    
    +~~~~
     ISRC <isrc>
    +~~~~
    +
    
     ...(without quotes).
    
     
  • Erik

    Erik - 2016-02-21
    • assigned_to: Erik
    • Group: 1.3.0 --> 1.3.x
     
  • Erik

    Erik - 2016-02-21

    Altough I maintain FLAC, I have never actually used the metaflac program in anger. Would you be able to give me sufficient info to recreate this issue on my machine?

     

    Last edit: Erik 2016-02-22
    • hhm0

      hhm0 - 2016-02-22
      cat <cuesheet-file> | metaflac --import-cuesheet-from=- file.flac
      

      ...is the same as...

      flac --cuesheet <cuesheet-file> <wav-file> -o file.flac
      

      , besides for that it does not encode the data.

       
  • lvqcl

    lvqcl - 2016-02-22

    src/share/grabbag/cuesheet.c, line 407:

    if(0 == (field = local__get_field_(&line, /*allow_quotes=*/false))) ...
    

    so quotes in ISRC are explicitely disabled (not enabled) in the code. The only thing with quotes enabled is CATALOG value, see https://git.xiph.org/?p=flac.git;a=commitdiff;h=12d7fcb8d9024f2932411f4d5ce13ecb6bfa1936

     
  • Daniel Pocock

    Daniel Pocock - 2016-02-22

    A similar issue (although maybe not exactly the same thing) observed using the flac package on Debian:
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815587

     
  • Erik

    Erik - 2016-04-26
    • status: open --> closed-fixed
     
  • Erik

    Erik - 2016-04-26

    Fixed in:

    commit 3de7413a368e99aba10d5ded042808abd279fb8a
    Author: Erik de Castro Lopo <erikd@mega-nerd.com>
    Date:   Tue Apr 26 17:55:36 2016 +1000
    
    cuesheet.c: Allow quotes around ISRC field
    
    With this change, flac now accepts cuesheets where the ISRC field is
    enclosed in double quotes. Added a test for this as well.
    
     

Log in to post a comment.