On Thu, Jan 12, 2017 at 10:32 AM, Timo Rothenpieler
<t...@rothenpieler.org> wrote:
> On 1/9/2017 7:22 PM, pkoshe...@gmail.com wrote:
>> From: Pavel Koshevoy <pkoshe...@gmail.com>

<snip>

>>      enum AVPixelFormat pix_fmts[3] = { AV_PIX_FMT_CUDA,
>>                                         AV_PIX_FMT_NV12,
>>                                         AV_PIX_FMT_NONE };
>>
>> +    enum AVPixelFormat probed_pix_fmt = (avctx->pix_fmt < 0 ?
>
> Shouldn't this be <= 0? If unset it will most likely be 0.

fixed and resubmitted in patch v4.


>> +                                         AV_PIX_FMT_YUV420P :
>> +                                         avctx->pix_fmt);
>> +
>> +    ret = convert_to_cuda_video_chroma_format(probed_pix_fmt, 
>> &probed_chroma_format);
>> +    if (ret < 0) {
>> +        // pixel format is not supported:
>
> Printing an error here would be better, instead of failing init without
> any indication what went wrong.

added an av_log call and resubmitted in patch v4.

>> +        return ret;
>> +    }
>> +    probed_width = avctx->coded_width ? avctx->coded_width : 1280;
>> +    probed_height = avctx->coded_height ? avctx->coded_height : 720;
>> +


Thank you,
    Pavel.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to