[Ffmpeg-devel] Timestamps on Decoding
Rich Felker
dalias
Mon Oct 24 11:16:57 CEST 2005
On Sun, Oct 23, 2005 at 09:02:37PM -0400, Ronald S. Bultje wrote:
> On Sun, 2005-10-23 at 18:45 -0400, Paul Curtis wrote:
> > But the last question was never answered: when I receive a complete raw
> > frame, how can I accurately tell what it is I have received? Queueing
> > the frames (audio or video) and presenting them to the Helix encoder
> > wouldn't be a problem IF I could determine when the frame SHOULD be
> > presented. This is the crux of the problem, and even Richard has said
> > it's a problem.
>
> Depends on how you call av_decode_video(). I call it in a loop, like
> this (quasi-code):
>
> for (;;) {
> if (output = av_decode_video (ctx, input)) {
> // do something with output
> }
> }
>
> 1) if it's an I frame, then output == input, roughly. Timestamps, all
Nope. You only have output == input for B frames. I and P frames will
always be delayed (if has_b_frames is true). (Work out the logic if
this isn't clear already..)
Rich
More information about the ffmpeg-devel
mailing list