Skip to content

Fix an is-empty condition in FFmpeg video capture when parsing FFmpeg options defined in the environment variables#26793

Merged
asmorkalov merged 1 commit intoopencv:4.xfrom
UnnamedOrange:4.x
Jan 20, 2025
Merged

Fix an is-empty condition in FFmpeg video capture when parsing FFmpeg options defined in the environment variables#26793
asmorkalov merged 1 commit intoopencv:4.xfrom
UnnamedOrange:4.x

Conversation

@UnnamedOrange
Copy link
Copy Markdown
Contributor

In the implementation of 4.10.0, a pointer null-assertion is used to check whether OPENCV_FFMPEG_CAPTURE_OPTIONS is empty.

if(options == NULL)

But since 4.11.0, a util named getConfigurationParameterString is introduced. The conditon above has been changed to a string empty-assertion, but the logic is improperly inversed. This PR fixes this problem.

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants