[Ffmpeg-cvslog] r8427 - trunk/libavformat/utils.c
Måns Rullgård
mans
Sat Mar 17 04:45:43 CET 2007
The Wanderer <inverseparadox at comcast.net> writes:
> michael wrote:
>
>> Author: michael
>> Date: Sat Mar 17 03:03:59 2007
>> New Revision: 8427
>> Modified:
>> trunk/libavformat/utils.c
>> Log:
>> simplify
>
>> + 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)
pkt->dts = st->last_IP_pts;
else
pkt->dts = st->cur_dts;
}
Without a little more context it's hard to say whether this is the
correct logic, but looks plausible and I'm too tired to investigate it
properly right now. Besides, Michael doesn't usually make mistakes.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-cvslog
mailing list