On Thu, Aug 3, 2017 at 5:45 PM, Tomas Härdin <tjop...@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 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel