[MPlayer-advusers] [BUG] mencoder floating point exception with -of lavf

Corey Hickey bugfood-ml at fatooh.org
Thu Nov 10 03:13:10 CET 2005


Rich Felker wrote:
>>Oddly enough, mplayer's avi muxer writes the header three times:
>>- first without knowing anything about the video
>>- second once it knows about the video stream
>>- third when it's completely done and it can write the number of video frames
>>
>>My buffering layer can make the first header-writing unneccessary, but can't
>>help the third. I can't think of any way to avoid it.
> 
> 
> No need to avoid it; this is correct behavior. The final fix-up for
> avi is part of the 'write trailer' operation, not a header rewrite.
> The fact that it happens to be implemented as rewriting the header for
> avi is coincidental; for sane formats this won't need to be done.

Ok. For some reason I was under the impression at some point early in
this thread that we would be able to write avi files without seeking.

>>+    muxer->muxbuf_do_buffer = 1;
> 
> 
> No need for a variable for this. It's always required for correctness.

Actually, I'm using that to keep track of when frames no longer need to
be buffered. Once the wrapper function sees a video frame, it sends all
the buffered frames to the muxer and sets muxbuf_do_buffer=0. Then the
rest of the frames go straight to the muxer without being buffered.

Is there a better approach?

-Corey




More information about the MPlayer-advusers mailing list