[FFmpeg-devel] [PATCH v4] mpeg12enc: Use Closed Captions if available

Devin Heitmueller dheitmueller at ltnglobal.com
Fri Feb 8 17:05:04 EET 2019


> On Feb 8, 2019, at 9:47 AM, Mathieu Duponchelle <mathieu at centricular.com> wrote:
> 
> On 2/8/19 11:58 AM, Michael Niedermayer wrote:
>> what if size is not a multiple of 3 ?
> 
> Good point, more bytes will be written than advertised. Do you reckon
> the input should be straight up refused? The other solution is to warn then
> iterate over side_data->size rounded down to the closest 3 multiple.

Yeah, so there are all sorts of ways the content could be screwed up and I don’t think we want to get into the business of having every encoder module try to validate it.  That said, a quick length check is reasonable to avoid a possible buffer overflow, so I would just write a log message and throw the entire array on the floor.

Devin

---
Devin Heitmueller - LTN Global Communications
dheitmueller at ltnglobal.com



More information about the ffmpeg-devel mailing list