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

Justin Ruggles justinruggles
Sat Jul 19 19:38:40 CEST 2008


Justin Ruggles wrote:
> 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(...)

Oh, I see what you mean.  You also need to set s->frame.blocksize in
flac_encode_init().

-Justin





More information about the ffmpeg-devel mailing list