[Ffmpeg-cvslog] r8427 - trunk/libavformat/utils.c

The Wanderer inverseparadox
Sat Mar 17 14:15:52 CET 2007

M?ns Rullg?rd wrote:

> The Wanderer <inverseparadox at comcast.net> writes:
>>michael wrote:
>>>Author: michael
>>>Date: Sat Mar 17 03:03:59 2007
>>>New Revision: 8427
>>>   trunk/libavformat/utils.c
>>>+        if (pkt->dts == AV_NOPTS_VALUE)
>>>+            pkt->dts = st->last_IP_pts;
>>>+        if (pkt->dts == AV_NOPTS_VALUE)
>>>+            pkt->dts = st->cur_dts;
>> Am I blind, or are these two if()s testing exactly the same
>> condition and then setting exactly the same variable to two
>> different values? That can't be right...
> Sure it can. The code above is equivalent to
> if (pkt->dts == AV_NOPTS_VALUE) {
>     if (st->last_IP_pts != AV_NOPTS_VALUE)

Ohh. I somehow missed the fact that setting the variable meant its value
on the second if would not necessarily be the same...

Guess the fact that (as I'd been saying for the past few days) I hadn't
had a full night's interrupted sleep in two weeks had more of an effect
than I thought. <grin>.

       The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Secrecy is the beginning of tyranny.

More information about the ffmpeg-cvslog mailing list