Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 249838 - media-sound/mp32ogg-0.11-r5: wrong warning
Summary: media-sound/mp32ogg-0.11-r5: wrong warning
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords: NeedPatch
Depends on:
Blocks:
 
Reported: 2008-12-04 20:01 UTC by Bartosz Neuman
Modified: 2009-07-25 22:00 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bartosz Neuman 2008-12-04 20:01:57 UTC
Use of --quality option always produce "MP3::Info didn't report the bitrate... weird. Corrupt MP3 file? Bug?" warning due to incorrect if / else structure.

Reproducible: Always

Steps to Reproduce:
1. Execute with --quality option
Actual Results:  
MP3::Info didn't report the bitrate... weird. Corrupt MP3 file? Bug?

Expected Results:  
(no warning)

Instead of:
        if (($userquality < -1) || ($userquality > 10)) {
            # Set quality adjacent to mp3 bitrate
            if($mp3bitrate ne "") {
                if($mp3bitrate > 256) {
                    $quality = 8;
                } elsif($mp3bitrate > 192) {
                    $quality = 7;
                } elsif($mp3bitrate > 128) {
                    $quality = 6;
                } else {
                    $quality = 5;
                }
        } else {
           $quality = 5;
           print "MP3::Info didn't report the bitrate... weird. Corrupt MP3 file? Bug?\n";
           # User defined quality
           $quality = $userquality;
        }

Use the following structure:

        if (($userquality < -1) || ($userquality > 10)) {
            # Set quality adjacent to mp3 bitrate
            if($mp3bitrate ne "") {
                if($mp3bitrate > 256) {
                    $quality = 8;
                } elsif($mp3bitrate > 192) {
                    $quality = 7;
                } elsif($mp3bitrate > 128) {
                    $quality = 6;
                } else {
                    $quality = 5;
                }
            } else {
              $quality = 5;
              print "MP3::Info didn't report the bitrate... weird. Corrupt MP3 file? Bug?\n";
            }
        } else {
           # User defined quality
           $quality = $userquality;
        }
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2009-05-12 13:22:56 UTC
Please provide a patch instead if you want this to go anywhere. Use the Create New Attachment and diff -u (man diff).
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2009-07-25 22:00:57 UTC
Tried copying your suggested change with but always ended up with "Execution of /usr/bin/mp32ogg aborted due to compilation errors".

Closing. Reopen when you've got a patch to attach, thanks.