Crop the given video AVFrame according to its crop_left/crop_top/crop_right/
crop_bottom fields. If cropping is successful, the function will adjust the
data pointers and the width/height fields, and set the crop fields to 0.
In all cases, the cropping boundaries will be rounded to the inherent
alignment of the pixel format. In some cases, such as for opaque hwaccel
formats, the left/top cropping is ignored. The crop fields are set to 0 even
if the cropping was rounded or ignored.
@param frame the frame which should be cropped
@param flags Some combination of AV_FRAME_CROP_* flags, or 0.
@return >= 0 on success, a negative AVERROR on error. If the cropping fields
were invalid, AVERROR(ERANGE) is returned, and nothing is changed.
Crop the given video AVFrame according to its crop_left/crop_top/crop_right/ crop_bottom fields. If cropping is successful, the function will adjust the data pointers and the width/height fields, and set the crop fields to 0.
In all cases, the cropping boundaries will be rounded to the inherent alignment of the pixel format. In some cases, such as for opaque hwaccel formats, the left/top cropping is ignored. The crop fields are set to 0 even if the cropping was rounded or ignored.
@param frame the frame which should be cropped @param flags Some combination of AV_FRAME_CROP_* flags, or 0.
@return >= 0 on success, a negative AVERROR on error. If the cropping fields were invalid, AVERROR(ERANGE) is returned, and nothing is changed.