FreeBSD Bugzilla – Attachment 206704 Details for
Bug 239971
multimedia/ffmpegthumbnailer: Add patch to autorotate 180° flipped video
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
https://github.com/dirkvdb/ffmpegthumbnailer/pull/149
e47a86cb239617f77396900a07eb5c38b89e973f.patch (text/plain), 1.85 KB, created by
mark burdett
on 2019-08-19 16:48:57 UTC
(
hide
)
Description:
https://github.com/dirkvdb/ffmpegthumbnailer/pull/149
Filename:
MIME Type:
Creator:
mark burdett
Created:
2019-08-19 16:48:57 UTC
Size:
1.85 KB
patch
obsolete
>From e47a86cb239617f77396900a07eb5c38b89e973f Mon Sep 17 00:00:00 2001 >From: munzli <manuel@monostream.com> >Date: Thu, 2 Mar 2017 19:29:01 +0100 >Subject: [PATCH] =?UTF-8?q?make=20180=C2=B0=20rotated=20videos=20rotate=20?= > =?UTF-8?q?correctly?= >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >--- > libffmpegthumbnailer/moviedecoder.cpp | 15 ++++++++++++--- > 1 file changed, 12 insertions(+), 3 deletions(-) > >diff --git a/libffmpegthumbnailer/moviedecoder.cpp b/libffmpegthumbnailer/moviedecoder.cpp >index ed3c8b3..0e2872b 100644 >--- a/libffmpegthumbnailer/moviedecoder.cpp >+++ b/libffmpegthumbnailer/moviedecoder.cpp >@@ -299,9 +299,14 @@ void MovieDecoder::initializeFilterGraph(const AVRational& timeBase, int size, b > > AVFilterContext* rotateFilter = nullptr; > auto rotation = getStreamRotation(); >- if (rotation != -1) >+ if (rotation == 3) > { >- checkRc(avfilter_graph_create_filter(&rotateFilter, avfilter_get_by_name("transpose"), "thumb_rotate", std::to_string(rotation).c_str(), nullptr, m_pFilterGraph), >+ checkRc(avfilter_graph_create_filter(&rotateFilter, avfilter_get_by_name("rotate"), "thumb_rotate", "PI", nullptr, m_pFilterGraph), >+ "Failed to create rotate filter"); >+ } >+ else if (rotation != -1) >+ { >+ checkRc(avfilter_graph_create_filter(&rotateFilter, avfilter_get_by_name("transpose"), "thumb_transpose", std::to_string(rotation).c_str(), nullptr, m_pFilterGraph), > "Failed to create rotate filter"); > } > >@@ -515,7 +520,11 @@ int32_t MovieDecoder::getStreamRotation() > if (matrix) > { > auto angle = lround(av_display_rotation_get(matrix)); >- if (angle > 45 && angle < 135) >+ if (angle < -135) >+ { >+ return 3; >+ } >+ else if (angle > 45 && angle < 135) > { > return 2; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 239971
: 206704