[FFmpeg-devel] [PATCH] Fix ffmpeg -re behaviour
Luca Abeni
lucabe72
Fri Nov 21 08:53:27 CET 2008
Hi,
Stefano Sabatini wrote:
[...]
>>> Also it doesn't appear to me such a crazy thing the idea to
>>> implement the rate_emu mechanism directly in the library (the decoding
>>> function could usleep up to when it will be time to output the decoded
>>> frame, as currently implemented in ffmpeg -re).
>> I do not know about this... Let's see Michael's opinion.
>
> Attached patch implements the solution suggested by Luca, that is to
> use rate_emu as a global option and use ist->next_pts rather than
> making the wrong assumption currently implemented.
This looks good, and is a nice improvement respect to the current state
of things...
Just one comment: I think you are assuming AV_TIME_BASE == 1000000 (since
you are comparing next_pts with the result of av_gettime()). This is the
case now, but in the future the AV_TIME_BASE value can change (I know this
is a problem, because I did the same mistake in the past, and I've been
asked to fix it :)
I am not ffmpeg.c maintainer (so, I think Michael's approval is needed),
but I think the patch should be applied (after fixing the
AV_TIME_BASE -> microseconds conversion).
Thanks,
Luca
More information about the ffmpeg-devel
mailing list