On Sun, Dec 26, 2010 at 10:50:53AM +0100, Reimar D?ffinger wrote:
> On 26 dec 2010, at 09:40, David Czech <davidczech510 at gmail.com> wrote:
>> >>
> >>> Yes, this is the wrong place, .den == 0 is an invalid value and a bug in
> > whatever sets it to that.
> >> Changing the code in ffmpeg.c means that other programs like MPlayer will
> > have to add the same hack and/or will still crash.
> >> It is unreasonable to expect users of libav* to check every single value
> > the library returns, that would mean 100s of lines of code even >before the
> > code does anything.
> >
> > Yeah, I guess that makes sense (I just thought that it was checking for
> > time_base.num but forgot about time_base.den).
>> No, num == 0 is a valid number at least, and in this case indicates "unknown".
> x/0 is not a valid number and generally should never be set at all, at least not without being mentioned specifically in the documentation including the reasoning.
0/0 is the closest to undefined there is and is also what timebase should be set
to when its unknown. (av_set_pts_info does that as well)
if you set it to 0/1 you have a framerate of 1/0 which isnt much better than
1/0 timebase.
>> > I'm completely lost in
> > ffmpeg's source code, where should the fix be? Maybe some intense debugging
> > might show who sets it to zero (if anyone does), but if not who should check
> > it?
a memory breakpoint or in gdb slang a watch point will tell you when a variable
changes. Once we know what exactly set it to 1/0 then we can think about
what is the best solution
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101227/64daaf79/attachment.pgp>