You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-29 05:57:37 +02:00
This code always ignored the user-provided enc_ctx->chroma_sample_location in favor of the location tagged on the frame. This leads to a very (IMHO) unexpected outcome where -chroma_sample_location works differently from the related options like -colorspace and -color_range, the latter of which override the frame properties as a consequence of being configured on the filter graph output. The discrepancy comes from the fact that the chroma sample location does not itself participate in filter graph negotiation. Solve the situation by only overriding the enc_ctx option if it was left unspecified by the user, and otherwise printing a warning if the requested parameter does not match the frame parameter.