Hi! On 2020-07-30 12:16 +0000, Zane van Iperen wrote: > On Fri, 31 Jul 2020 00:55:56 +0800 > "zongwave" <wei.z...@intel.com> wrote: [...] > > > ++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.
Please don't. There were many bugs because of stuffing the assignment into the condition. It's not so likely to be spotted once it's planted inside. IMHO the trade off for most cases, saving one line, is not worth it. > Overall looks fine, but someone more familiar with > libavfilter should probably double-check. Alexander _______________________________________________ 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".