[FFmpeg-devel] [PATCH] mxfenc: ensure mxf->body_partition_offset is not NULL before using it
tomas.hardin at codemill.se
tomas.hardin at codemill.se
Wed Mar 18 16:59:31 CET 2015
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?
/Tomas
More information about the ffmpeg-devel
mailing list