#786646 sox: play(1) confused about mp3 length, can segv

Package:
sox
Source:
sox
Description:
Swiss army knife of sound processing
Submitter:
Mike Kupfer
Date:
2015-05-23 21:57:12 UTC
Severity:
normal
#786646#5
Date:
2015-05-23 21:39:29 UTC
From:
To:
Dear Maintainer,

I have an MP3 file that I wanted to listen to using play(1).  The file
is approximately 52 minutes long and can be downloaded from
http://audiodharma.org/teacher/22/talk/2815/venue/IMC/20120105-Daniel_Bowling-IMC-mindfulness_conflict_resolution_and_neuroscience_part_1.mp3.

If I start from the very beginning, i.e.,

  play FILE

everything is okay.  If I start a few seconds in, e.g.,

  play FILE trim 0:05

I can listen to the recording, though I get this message:

  play WARN mp3: MAD lost sync

If I start even further in, like 39 minutes into the recording, I get
the same "lost sync" message, and play(1) exits at approximately
39:10.

If I try to start the recording even further in, e.g.,

  play FILE trim 46:00

play(1) dies with a segmentation violation.

syslog message:

  May 23 14:28:34 allegro kernel: [11001.672046] play[6752]: segfault at 0 ip 00007f74fdae0f19 sp 00007fffcff0d010 error 4 in libmad.so.0.2.1[7f74fdade000+1e000]

I don't know if this is a sox issue or a libmad issue, but I'll note
that

  madplay -s 46:00 FILE

works just fine.