[Ffmpeg-devel] [PATCH] a fix in ffmpeg.c

Michael Niedermayer michaelni
Tue Jan 30 01:34:19 CET 2007


On Tue, Jan 23, 2007 at 11:06:53AM +0800, Limin Wang wrote:
> Hi,
> > this looks better but it still has problems
> > first it overrides the demuxer timebase blindly, which breaks some
> > h264 in avi/mov, also it breaks user specified timebases 
> > (ffmpeg -r 12 myfile.h264 out.abc)
> > 
> > so the check should not be for CODEC_ID_H264 but rather for the lack of
> > a set timebase (this needs some change to libavformat/raw.c more specifically
> > the hardcoded 1/25 timebase there should be changed to 0/0) then utils.c
> > somewhere should check for this and set it to the codec timebase
> > st->codec->time_base with av_set_pts_info or if that also is 0/0 then 
> > use some random default like 1/25
> I have fixed by your suggestion, please review the attached patch. One problem
> is it'll cause av_rescale_q() in utils.c floating point exception, I don't know
> what's the background. After comment it out, I can pass the test without

av_rescale_q cant work with 0/0 timebase
a if(timebase.den != 0) around that should fix it

also do the regresion tests pass with your patch (make test) ?
and video grabing should also be tested (by someone) if all works fine then
this patch (with the av_rescale_q if fix) should be ok

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Democracy is the form of government in which you can choose your dictator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070130/402c6adb/attachment.pgp>

More information about the ffmpeg-devel mailing list