On Fri, 31 Jul 2020 00:55:56 +0800
"zongwave" <wei.z...@intel.com> wrote:

> ++static int xcam_query_formats(AVFilterContext *ctx)
> ++{
> ++    XCAMContext *s = ctx->priv;
> ++    AVFilterFormats *formats = NULL;
> ++
> ++    static const enum AVPixelFormat nv12_fmts[] = {AV_PIX_FMT_NV12, 
> AV_PIX_FMT_NONE};
> ++    static const enum AVPixelFormat yuv420_fmts[] = {AV_PIX_FMT_YUV420P, 
> AV_PIX_FMT_NONE};
> ++    static const enum AVPixelFormat auto_fmts[] = {AV_PIX_FMT_NV12, 
> AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE};

Would these be better above the function instead of inside it?

> ++static av_cold int xcam_init(AVFilterContext *ctx)
> ++{
> ++    XCAMContext *s = ctx->priv;
> ++    int ret = 0;
> ++
> ++    s->handle = xcam_create_handle(s->name);
> ++    if (!s->handle) {

Style nitpick, I'd tend to prefer inlining the assignment:

    if (!(s->handle = xcam_create_handle(s->name)))

but I guess that's personal preference.


Overall looks fine, but someone more familiar with
libavfilter should probably double-check.

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to