Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

soundsource*::ParseHeader discrepancies #5260

Closed
mixxxbot opened this issue Aug 22, 2022 · 6 comments
Closed

soundsource*::ParseHeader discrepancies #5260

mixxxbot opened this issue Aug 22, 2022 · 6 comments

Comments

@mixxxbot
Copy link
Collaborator

Reported by: fenugrec
Date: 2009-12-30T04:10:48Z
Status: Fix Released
Importance: Undecided
Launchpad Issue: lp501542
Attachments: [patch #4910](https://bugs.launchpad.net/bugs/501542/+attachment/1083493/+files/patch #4910), [parseheader 1.8 patch](https://bugs.launchpad.net/bugs/501542/+attachment/1142580/+files/parseheader 1.8 patch)


This patch fixes all kinds of differences in the ::ParseHeader functions
of the sound proxies. The behaviour should now be:

A) returning ERR means the file is invalid, but does not imply it has (in)valid tags.
B) setHeaderParsed is set to TRUE at the end of ::ParseHeader to indicate that

  1. the file has been succesfully opened (although not necessarily playable)
  2. tags, if present, have been read

The upper levels should call ParseHeader conditionally (i.e. only if getHeaderParsed
returns false) to avoid useless filesystem activity.

Different proxies handle empty tag fields differently (i.e. writing "" or just
not writing anything);
but since each item (artis, title, etc.) should be NULL initially (?), this is
irrelevant.

The initial patch I'm including is based on 1.7 trunk (as of rev ~ 2535) and touches
the following files:
soundsourcem4a.cpp
soundsourcemp3.cpp
soundsourceoggvorbis.cpp
soundsourcesndfile.cpp

the patch also fixes some handles not being closed before returning ERR.

@mixxxbot
Copy link
Collaborator Author

Commented by: fenugrec
Date: 2009-12-30T04:10:48Z
Attachments: [patch #4910](https://bugs.launchpad.net/mixxx/+bug/501542/+attachment/1083493/+files/patch #4910)

@mixxxbot
Copy link
Collaborator Author

Commented by: dcd2168
Date: 2010-01-25T01:14:24Z


no audio, no start

@mixxxbot
Copy link
Collaborator Author

Commented by: fenugrec
Date: 2010-01-26T01:00:29Z


piloto: You'll have to provide a bit more info..
-what OS
-what build/branch of mixxx
-was the patch succesful - note that 1.7 is now waaay past 2535 so the patch probably wouldn't work as-is.
-error messages
-etc...

@mixxxbot
Copy link
Collaborator Author

Commented by: Pegasus-RPG
Date: 2010-02-12T09:00:38Z


Patch applies cleanly to 1.7 branch and tests good for me on MP3 and FLAC files.

@mixxxbot
Copy link
Collaborator Author

Commented by: fenugrec
Date: 2010-02-13T20:06:50Z
Attachments: [parseheader 1.8 patch](https://bugs.launchpad.net/mixxx/+bug/501542/+attachment/1142580/+files/parseheader 1.8 patch)


Oops, I forgot a set of {} in soundsourceoggvorbis.cpp (lines 271-273)
(fixed in mixxxdj/mixxx#7166 , thanks Albert)

Here's the equivalent (complete) patch, against 1.8 trunk mixxxdj/mixxx#7223.
specifically :
ssmp3.cpp;
ssoggvorbis.cpp;
sssoundfile.cpp;

also makes the qDebug messages print out in a more standard format:
qDebug() << "SS[MP3|OV|SNDFILE]::[function]: [error message]";

@mixxxbot
Copy link
Collaborator Author

Issue closed with status Fix Released.

@mixxxbot mixxxbot transferred this issue from another repository Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant