Skip to content

FFmpeg: correct direction of displaymatrix rotation#22089

Merged
opencv-pushbot merged 1 commit intoopencv:4.xfrom
tailsu:sd/fix-displaymatrix-orientation
Jun 13, 2022
Merged

FFmpeg: correct direction of displaymatrix rotation#22089
opencv-pushbot merged 1 commit intoopencv:4.xfrom
tailsu:sd/fix-displaymatrix-orientation

Conversation

@tailsu
Copy link
Copy Markdown
Contributor

@tailsu tailsu commented Jun 10, 2022

Fixes #22088

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
force_builders=Win64

@tailsu tailsu changed the title correct direction of displaymatrix rotation FFmpeg: correct direction of displaymatrix rotation Jun 10, 2022
Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fix!

ASSERT_TRUE(cap.isOpened()) << "Can't open the video: " << video_file << " with backend " << CAP_FFMPEG << std::endl;

// related issue: https://github.com/opencv/opencv/issues/22088
EXPECT_EQ(90, cap.get(CAP_PROP_ORIENTATION_META));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FFmpeg wrapper for Windows is still old (it is not automatically updated).
Please put this check under temporary guard:

#ifdef _WIN32  // TODO: FFmpeg wrapper update

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably meant #ifndef right?

@tailsu tailsu force-pushed the sd/fix-displaymatrix-orientation branch from d32fea1 to 2f25d50 Compare June 13, 2022 12:18
@tailsu tailsu force-pushed the sd/fix-displaymatrix-orientation branch from 2f25d50 to d09bd6f Compare June 13, 2022 14:17
Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done! Thank you for contribution 👍

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.

Videos with orientation metadata rotated in the opposite direction

4 participants