[FFmpeg-devel] [PATCH] mxfenc: ensure mxf->body_partition_offset is not NULL before using it

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Tue Mar 17 16:13:10 CET 2015


On 17.03.2015 10:17, tomas.hardin at codemill.se wrote:
> On 2015-03-14 18:03, Andreas Cadhalpun wrote:
> [PATCH 2/2] mxfenc: don't try to write footer without header:
> 
>> +    if (!mxf->header_written ||
>> +        (s->oformat == &ff_mxf_opatom_muxer && !mxf->body_partition_offset)) {
>> +        err = AVERROR_UNKNOWN;
>> +        goto end;
>> +    }
>> +
> 
> AVERROR_UNKNOWN?

It's unclear why the header was not written or body_partition_offset
not allocated. It could e.g. be due to invalid options, not supported
codecs, or just out of memory.
Do you think AVERROR(EINVAL) or even just -1 would be better?

Best regards,
Andreas



More information about the ffmpeg-devel mailing list