[vlc-devel] [PATCH 1/3] video_output: do not forward visible dimensions in the filter chain

Felix Abecassis felix.abecassis at gmail.com
Fri Feb 21 19:49:38 CET 2014


For instance when using a 90 degrees rotation for 1080p, the new
fmt_current is 1080x1920, with the previous code the visible
dimensions of fmt_target would be set to 1080x1920 with
i_width/i_height set to 1920x1080. This is clearly wrong.
---
 src/video_output/video_output.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 64bef99..426fb2f 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -795,7 +795,11 @@ static void ThreadChangeFilters(vout_thread_t *vout,
         fmt_current = *filter_chain_GetFmtOut(chain);
         vlc_array_clear(array);
     }
-    VideoFormatCopyCropAr(&fmt_target.video, &fmt_current.video);
+
+    /* Copy aspect-ratio modification */
+    fmt_target.video.i_sar_num = fmt_current.video.i_sar_num;
+    fmt_target.video.i_sar_den = fmt_current.video.i_sar_den;
+
     if (!es_format_IsSimilar(&fmt_current, &fmt_target)) {
         msg_Dbg(vout, "Adding a filter to compensate for format changes");
         if (!filter_chain_AppendFilter(vout->p->filter.chain_interactive, NULL, NULL,
-- 
1.8.3.2




More information about the vlc-devel mailing list