JyotsnaT / xuggle

Automatically exported from code.google.com/p/xuggle
0 stars 0 forks source link

crash when converting from raw pcm #203

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
OS: Mac OS X 10.5.8
Xuggler: v3.2

When I recently upgraded to v3, Xuggler started crashing when converting
from raw pcm to any other format (converting to raw pcm is still ok).

To make it easier to reproduce for you, I've modified Converter.java (see
attached) to support converting from raw files by adding new args:
icontainerformat, iacodec, isamplerate, and iachannels.

Compile the attached Converter.java and run it with these args:
     file:///test-data/test.raw file:///test-data/test.wav
-icontainerformat s16le -iasamplerate 16000 -iachannels 1

Using Xuggler v2, this will successfully create a test.wav.  Using Xuggler
v3.2, it will print "Invalid memory access of location 0x0 rip=0x1121626c8"
and then crash on a floating-point exception.

Original issue reported on code.google.com by paleozogt on 2 Sep 2009 at 11:38

Attachments:

GoogleCodeExporter commented 9 years ago
I should mention that test.raw in the example is a raw pcm: s16le, 1 channel, 
16k
sample rate.

Original comment by paleozogt on 2 Sep 2009 at 11:40

GoogleCodeExporter commented 9 years ago
Please also attach a sample file that causes the problem.

Original comment by art.cla...@gmail.com on 2 Sep 2009 at 11:41

GoogleCodeExporter commented 9 years ago
I've attached the s16le, 1 channel, 16k raw pcm file that can cause the problem.

Original comment by paleozogt on 3 Sep 2009 at 2:57

Attachments:

GoogleCodeExporter commented 9 years ago
taking a look at this today.  By the way, I reviewed the changes in your
Converter.java and they seem good (and worth of inclusion in the actual Xuggler 
Product).

Are you willing to donate them under the LGPL license to us (in which case, 
I'll put
them in the next xuggler release)?

Original comment by art.cla...@gmail.com on 11 Sep 2009 at 3:40

GoogleCodeExporter commented 9 years ago
Yes, of course. :)

Original comment by paleozogt on 11 Sep 2009 at 3:47

GoogleCodeExporter commented 9 years ago
Fixed in r923.

This turns out to be two issues.  One if a ffmpeg-bug, the patch for which I
submitted last night:
http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2009-September/075607.html

And added to our captive ffmpeg install that comes with Xuggler AGPL.

The second issue is your changes to Converter.java don't work; not because you 
did
something stupid, but because we hadn't exposed a way for the IContainer object 
to
have a codec forced on it.  Your previous changes only happened to work because 
the
FFmpeg team wasn't trying to compute audio duration on earlier versions of 
Xuggler.

I took the intent of your Converter.java patch, but added some new features to
Xuggler (see issue #210) that allows you to manually override the codec assumed 
when
reading.  This allows you sample command in this bug to now pass.

I also added regression tests for the crashes, so hopefully this will stay 
fixed. 
Note that if you use your own version of FFmpeg, you may need to apply our 
patches to
avoid crashes (because FFmpeg does not accept every patch we submit).

Enjoy.

- Art

Original comment by art.cla...@gmail.com on 14 Sep 2009 at 5:27

GoogleCodeExporter commented 9 years ago
I checked out tip-of-tree and pcm conversion is working fine now. :)

Original comment by paleozogt on 14 Sep 2009 at 9:49

GoogleCodeExporter commented 9 years ago

Original comment by art.cla...@gmail.com on 14 Sep 2009 at 10:13