[FFmpeg-devel] [PATCH] flac encoding, issue 526

Justin Ruggles justinruggles
Sat Jul 19 19:35:43 CEST 2008


Mathieu Velten wrote:
> new patch attached
> 
> if ((data == NULL) || (avctx->frame_size != s->frame.blocksize)) {
>      write_streaminfo(s, avctx->extradata);
> }
> 
> this is also execute during the first frame, so the header stored in
> extradata will have the length of the first frame instead of 0 during
> the encoding.
> is it a problem ?

Yes, it's a problem.  Check for the last frame at the beginning of
flac_encode_frame().

int last_frame = (data == NULL) || (avctx->frame_size != s->frame.blocksize)

...

if(last_frame)
    write_streaminfo(...)




More information about the ffmpeg-devel mailing list