soundsource*::ParseHeader discrepancies

Bug #501542 reported by fenugrec
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Undecided
fenugrec
1.7
Won't Fix
Medium
fenugrec

Bug Description

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.

Revision history for this message
fenugrec (fenugrec) wrote :
fenugrec (fenugrec)
Changed in mixxx:
status: New → In Progress
assignee: nobody → C. Stewart (fenugrec)
Revision history for this message
piloto (dcd2168) wrote :

no audio, no start

Revision history for this message
fenugrec (fenugrec) wrote :

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...

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

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

Revision history for this message
fenugrec (fenugrec) wrote :

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

Here's the equivalent (complete) patch, against 1.8 trunk #2314.
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]";

Changed in mixxx:
status: In Progress → Fix Committed
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/5260

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.