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

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Wed Mar 18 22:01:36 CET 2015


On 18.03.2015 16:59, tomas.hardin at codemill.se wrote:
> On 2015-03-17 16:13, Andreas Cadhalpun wrote:
>> 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
> 
> No preference really. Perhaps a comment though?

OK. New patch with comment attached.

Best regards,
Andreas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-mxfenc-don-t-try-to-write-footer-without-header.patch
Type: text/x-diff
Size: 1069 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150318/664d50a9/attachment.bin>


More information about the ffmpeg-devel mailing list