The default for the chromaoffset field in AVCodecContext is zero, which until now always ended up overriding the AVOption-set value, thus leading to the AVOption not working. Additionally, the previous usage prevented the usage of negative values, while both the variable as well as x264's API would successfully handle such. Thus, the default value of the AVOption is changed to match the default of x264 (and what is currently the default for the AVCodecContext chromaoffset field), and the checks are changed to check for nonzero values. This way: 1. the library default is still utilized if the value is zero. 2. both negative and positive values are correctly passed to x264. For historical context, this was initially similarly implemented inpull/345/head^25764d38173
, and thenb340bd8a58
broke the value. Partially reverts commitb340bd8a58
. Signed-off-by: Takio Yamaoka <y.takio@gmail.com>
parent
2c35797e18
commit
cc6c56f5d9
1 changed files with 3 additions and 3 deletions
Loading…
Reference in new issue