[FFmpeg-devel] [PATCH] Fix floating point exception computing duration when no time-base is set

Michael Niedermayer michaelni
Tue Sep 15 04:40:08 CEST 2009

On Mon, Sep 14, 2009 at 02:02:23PM -0700, Art Clarke wrote:
> On Mon, Sep 14, 2009 at 6:32 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > what is the reason that he did not set a time_base as well?
> >
> Because our user screwed up in their API usage, and was using raw PCM
> data .  They didn't set the AVFormatContext->audio_codec_id equivalent
> in the Xuggler API and they didn't call the av_find_stream_info
> equivalent, but they did set the the AVCodecContext->sample rate to a
> non-zero value.  They then attempted to read a packet.  Since
> AVCodecContext->sample_rate was non-null, libavformat decided to try
> calculating duration of that packet (it otherwise wouldn't), but since
> the user hadn't set a time base that av_read_frame call crashed their
> entire Java virtual machine.  Shame on them.

what about fixing the jvm?

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090915/c38df424/attachment.pgp>

More information about the ffmpeg-devel mailing list