[FFmpeg-devel] [PATCH 2/2] avformat/matroskaenc: Regression fix for invalid MKV headers

Soft Works softworkz at hotmail.com
Fri Jan 6 19:41:09 EET 2017


> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> on behalf of James Almer <jamrial at gmail.com>
> Sent: Friday, January 6, 2017 6:02 AM
> 
> IMO, no point calculating and writing a CRC element for this temporary state.
> You can rename and simplify this function into something like
> 
> static void end_ebml_master_preliminary(AVIOContext *pb, AVIOContext **dyn_cp,
>                                         ebml_master master)
> {
>     uint8_t *buf;
>     int size = avio_get_dyn_buf(*dyn_cp, &buf);
> 
>     avio_write(pb, buf, size);
>     end_ebml_master(pb, master);
> }

James,

thanks for looking into this!

I wasn't sure if clients would be OK when some headers have CRC and some have not 
(in the preliminary state). Also I'm not sure if clients are OK with the CRC bytes being 
zero. 
But if you're sure that all this is fine, I'll make this change...

softworkz


More information about the ffmpeg-devel mailing list