Ticket #84 (closed defect: fixed)

Opened 17 months ago

Last modified 6 months ago

Error when checksumming extremely short tracks

Reported by: https://www.google.com/accounts/o8/id?id=aitoawmvapwjwrnbx6tdb_mq38simenqnwufegs Owned by: https://thomasvs.myopenid.com/
Priority: major Milestone: 0.1.3
Component: morituri Version: master
Keywords: Cc:

Description

I have a CD (Kate Bush - 50 Words For Snow) with a HTOA with very few (1 or 2) frames in it. From poking at the code, it seems that gstreamer never reports a single buffer of data, so ChecksumTask?._new_buffer_cb() is never called, and stopped() then fails with common.EmptyError?('not a single buffer gotten').

Temp files:

$ file /tmp/*.wav /tmp/*.flac
/tmp/tmp4K3nGs.morituri.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz
/tmp/tmp2Zz7GS.morituri.flac: FLAC audio bitstream data, 16 bit, stereo, 44.1 kHz, 1176 samples

Output:

Found Hidden Track One Audio from frame 0 to 1
Ripping track 0 of 7: 00. Kate Bush - Hidden Track One Audio.flac
rip: error: Could not create encoded file.

I tried uncommenting the:

def _eos_cb(self, sink):

# get the last one; FIXME: why does this not get to us before ?
#self._new_buffer_cb(sink)

But no buffer was provided, so it crashed.

From all that I'd say this looked like a gstreamer bug, except that I can't find any other problems with tiny flac files. Even with just 1 sample I can use gst-launch to play/transcode.

Change History

comment:1 Changed 16 months ago by http://thomasvs.myopenid.com/

My mom happened to have that CD, so I tried it and found a fix. It is indeed a bug in flacdec. I have a patch, but I want to add a unit test for it as well.

comment:2 Changed 13 months ago by https://www.google.com/accounts/o8/id?id=aitoawmvapwjwrnbx6tdb_mq38simenqnwufegs

I've just come back to this CD after a system upgrade, and it now works! Except for one crash:

Traceback (most recent call last):
  File "/home/phil/external/source/morituri/bin/rip", line 35, in <module>
    sys.exit(main.main(sys.argv[1:]))
  File "/home/phil/external/source/morituri/morituri/rip/main.py", line 19, in main
    ret = c.parse(argv)
  File "/home/phil/external/source/morituri/morituri/rip/main.py", line 92, in parse
    logcommand.LogCommand.parse(self, argv)
  File "/home/phil/external/source/morituri/morituri/extern/command/command.py", line 343, in parse
    return self.subCommands[command].parse(args[1:])
  File "/home/phil/external/source/morituri/morituri/extern/command/command.py", line 343, in parse
    return self.subCommands[command].parse(args[1:])
  File "/home/phil/external/source/morituri/morituri/extern/command/command.py", line 312, in parse
    ret = self.do(args)
  File "/home/phil/external/source/morituri/morituri/rip/cd.py", line 269, in do
    ripIfNotRipped(0)
  File "/home/phil/external/source/morituri/morituri/rip/cd.py", line 244, in ripIfNotRipped
    print 'Peak level: %.2f %%' % (math.sqrt(trackResult.peak) * 100.0, )
TypeError: a float is required

A quick hack that seemed to work:

                if trackResult.peak == None:
                    print 'FAKING IT'
                    trackResult.peak = 1

I have no idea if that is just masking a problem, but anyway the rip worked, so thanks for your work.

comment:3 Changed 6 months ago by https://thomasvs.myopenid.com/

I had fixed flacdec to handle this, so this was fixed.

comment:4 Changed 6 months ago by https://thomasvs.myopenid.com/

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.