[FFmpeg-devel] [WIP] libcodec2 wrapper + de/muxer in FFmpeg
Hendrik Leppkes
h.leppkes at gmail.com
Thu Aug 3 18:59:19 EEST 2017
On Thu, Aug 3, 2017 at 5:45 PM, Tomas Härdin <tjoppen at acc.umu.se> wrote:
>> > + } else {
>> > + if (avctx->extradata_size != sizeof(avpriv_codec2_header))
>> > {
>> > + av_log(avctx, AV_LOG_ERROR, "must have exactly %zu
>> > bytes of extradata (got %i)\n",
>> > + sizeof(avpriv_codec2_header), avctx-
>> > >extradata_size);
>> return AVERROR_INVALIDDATA?
>
> Good catch, fixed. Should AVERROR_INVALIDDATA be preferred over
> AVERROR(EINVAL) perhaps? I've seen both used almost interchangably.
>
Generally, AVERROR_INVALIDDATA is for invalid bitstreams (which
extradata would be a part of), AVERROR(EINVAL) for invalid
user-provided options/settings.
Not all code follows that quite strictly, but thats the usual
definition we use around here.
- Hendrik
More information about the ffmpeg-devel
mailing list