On Fri, Nov 04, 2022 at 03:13:35PM +0100, OvchinnikovDmitrii wrote: > Support both simple and receive_frame api > The container crop information is applied additional to frame crop information [...] > + av_log(avctx, AV_LOG_WARNING, > + "Apply container and elementary stream corpping parametes error: " > + "container cropping parameters" > + "%"SIZE_SPECIFIER"/%"SIZE_SPECIFIER"/%"SIZE_SPECIFIER"/%"SIZE_SPECIFIER" " > + "elementary stream croping paramters" > + "%"SIZE_SPECIFIER"/%"SIZE_SPECIFIER"/%"SIZE_SPECIFIER"/%"SIZE_SPECIFIER" " > + "(frame size %dx%d). This is a bug, please report it\n", > + avctx->container_crop_left, avctx->container_crop_right, avctx->container_crop_top, avctx->container_crop_bottom, > + frame->crop_left, frame->crop_right, frame->crop_top, frame->crop_bottom, > + frame->width, frame->height); > + frame->crop_left = 0; > + frame->crop_right = 0; > + frame->crop_top = 0; > + frame->crop_bottom = 0; > + return 0; > + } > + > + frame->crop_top += avctx->container_crop_top; > + frame->crop_left += avctx->container_crop_left; > + frame->crop_bottom += avctx->container_crop_bottom; > + frame->crop_right += avctx->container_crop_right; > + }else if (avctx->container_apply_cropping == FF_CONTAINER_CROPPING_OVERWRITE) { > + > + /*check the croppping parameters from container are reasonable and correct*/ > + if (avctx->container_crop_left >= INT_MAX - avctx->container_crop_right || > + avctx->container_crop_top >= INT_MAX - avctx->container_crop_bottom || > + (avctx->container_crop_left + avctx->container_crop_right) >= frame->width || > + (avctx->container_crop_top + avctx->container_crop_bottom) >= frame->height) { > + av_log(avctx, AV_LOG_WARNING, > + "Invalid container cropping information set by a demuxer: " > + "%"SIZE_SPECIFIER"/%"SIZE_SPECIFIER"/%"SIZE_SPECIFIER"/%"SIZE_SPECIFIER" " > + "(frame size %dx%d). This is a bug, please report it\n", > + avctx->container_crop_left, avctx->container_crop_right, avctx->container_crop_top, avctx->container_crop_bottom, > + frame->width, frame->height); The types seems mismatching thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I do not agree with what you have to say, but I'll defend to the death your right to say it. -- Voltaire