[x264-devel] How to flush delayed frames?

Jason Garrett-Glaser darkshikari at gmail.com
Wed Mar 17 21:47:41 CET 2010


On Wed, Mar 17, 2010 at 1:34 PM, Alex Sadovsky <alexeysad at gmail.com> wrote:
>>> I'm trying to get the delayed frames from the encoder just the same
>>> way as x264.c does. The problem is that x264_encoder_encode keeps
>>> returning zeroes despite of x264_encoder_delayed_frames returning
>>> something greater then zero. Is there anything special I should do in
>>> order to get those frames?
>>
>> You need to pass encoder_encode a NULL input to signal x264 that there
>> are no more frames coming.
>
> That's what I'm trying to do, but x264_encoder_delayed_frames returns zeroes
> and delayed frame counter stays at it's value, something around 3 or 5 frames.

What is the "delayed frame counter"?  libx264 doesn't have one.

> I noticed that this problem goes away if I set thread count to 1, so
> this must be
> multithreading related. Another problem is that when I try to enable
> slice threading
> the application crashes somewhere in x264 code.

gdb backtrace?  "It crashes" is not useful.

> Are there any known problems using x264 compiled as a dll with mingw and calling
> from an MSVC app using delayed loading?

Probably a lot.  I would recommend you use a compiler that isn't a
pile of garbage; if you insist on Microsoft's IDE, you can at least
use ICL.

Dark Shikari


More information about the x264-devel mailing list