On Thu, Sep 8, 2016 at 7:17 AM, Anton Khirnov <[email protected]> wrote:
> Quoting Mark Thompson (2016-09-06 22:53:18)
>> @@ -2480,6 +2514,20 @@ int vp78_decode_frame(AVCodecContext *avctx, void 
>> *data, int *got_frame,
>>      if (ret < 0)
>>          goto err;
>>
>> +    if (!is_vp7 && s->pix_fmt == AV_PIX_FMT_NONE) {
>> +        enum AVPixelFormat pix_fmts[] = {
>> +            AV_PIX_FMT_YUV420P,
>> +            AV_PIX_FMT_NONE,
>> +        };
>> +
>> +        s->pix_fmt = ff_get_format(s->avctx, pix_fmts);
>> +        if (s->pix_fmt < 0) {
>> +            ret = AVERROR_BUG;
>
> AVERROR_BUG is meant to be used in cases that should not happen in valid
> code, it's like a "soft assert".
> Since it's perfectly valid for ff_get_format() to fail, you should
> instead use something like AVERROR_UNKNOWN.

Doesn't ff_get_format return an error code which he could/should just forward?

- Hendrik
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to