[x264-devel] Re: [patch] minor code cleanup and fix for x264.c

Loren Merritt lorenm at u.washington.edu
Sun Jan 21 10:02:25 CET 2007


On Mon, 15 Jan 2007, Limin Wang wrote:
> Loren Merritt 2007-01-15 00:07:58 -0700:
>>
>> i_frame_total == 0 means unkown, i.e. piped input or some muxer that
>> doesn't store the movie length. I suppose using INT_MAX for that instead
>> would slightly reduce the code size.
>
> We can mark frame total count is zero without issue. For in case i_frame_total
> is 0, the code execution will never enter encode "for" loop.

Is your statement supposed to be a feature request, or a description of 
the current code? Because it's not true now.

> I prefer to checking i_frame_total before encode, if i_frame_total == 0,
> report error and return directly.

You'd also have to check whether the demuxer is supposed to know the
movie length. Because if it doesn't know, then the correct behavior is
to just encode until it stops returning input frames, and don't display
a percentage progress report.

--Loren Merritt

-- 
This is the x264-devel mailing-list
To unsubscribe, go to: http://developers.videolan.org/lists.html



More information about the x264-devel mailing list