AAXtoMP3 icon indicating copy to clipboard operation
AAXtoMP3 copied to clipboard

Syntax error at Line 811 when parsing cover image size

Open utf8please opened this issue 2 years ago • 0 comments

I think I've hit a rare edge case here, but I'm getting Syntax error at Line 811 when parsing a certain image.

The relevant lines are below:

https://github.com/KrumpetPirate/AAXtoMP3/blob/f65fddebc28b4baab90d21e22f9f7eebd90f89b5/AAXtoMP3#L810-L811

For a certain image, ffprobe produces the following output:

[mjpeg @ 0x5600ea8b5f80] EOI missing, emulating
Input #0, image2, from 'Foo_Bar_(1215).jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: 14741 kb/s
  Stream #0:0: Video: mjpeg (Progressive), yuvj420p(pc, bt470bg/unknown/unknown), 1215x1215 [SAR 1:1 DAR 1:1], 25 fps, 25 tbr, 25 tbn

Note that the first line contains 0x5600ea8b5f80, which matches the regex as well. As a result, cover_width was actually set to TWO lines, 0\n1215. Then the next line fails after substitution since it is broken into two lines.

utf8please avatar Mar 28 '22 03:03 utf8please