[vlc-commits] yuv: only use a local video format when it's used
Steve Lhomme
git at videolan.org
Mon Sep 7 08:16:59 CEST 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Sep 2 09:33:24 2020 +0200| [cec046ee7ada4490d1a4112c23f01057405bf04c] | committer: Steve Lhomme
yuv: only use a local video format when it's used
It's only used to print the format info before the first picture is
displayed. After that the format is not needed anymore.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cec046ee7ada4490d1a4112c23f01057405bf04c
---
modules/video_output/yuv.c | 27 +++++++++++++--------------
1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a/modules/video_output/yuv.c b/modules/video_output/yuv.c
index 6d7003e863..f5789cce28 100644
--- a/modules/video_output/yuv.c
+++ b/modules/video_output/yuv.c
@@ -174,20 +174,6 @@ static void Display(vout_display_t *vd, picture_t *picture)
{
vout_display_sys_t *sys = vd->sys;
- /* */
- video_format_t fmt = *vd->fmt;
-
- if (ORIENT_IS_SWAP(vd->source->orientation))
- {
- fmt.i_sar_num = vd->source->i_sar_den;
- fmt.i_sar_den = vd->source->i_sar_num;
- }
- else
- {
- fmt.i_sar_num = vd->source->i_sar_num;
- fmt.i_sar_den = vd->source->i_sar_den;
- }
-
/* */
char type;
if (picture->b_progressive)
@@ -207,6 +193,19 @@ static void Display(vout_display_t *vd, picture_t *picture)
if (!sys->is_first) {
const char *header;
char buffer[5];
+ video_format_t fmt = *vd->fmt;
+
+ if (ORIENT_IS_SWAP(vd->source->orientation))
+ {
+ fmt.i_sar_num = vd->source->i_sar_den;
+ fmt.i_sar_den = vd->source->i_sar_num;
+ }
+ else
+ {
+ fmt.i_sar_num = vd->source->i_sar_num;
+ fmt.i_sar_den = vd->source->i_sar_den;
+ }
+
if (sys->is_yuv4mpeg2) {
/* MPlayer compatible header, unfortunately it doesn't tell you
* the exact fourcc used. */
More information about the vlc-commits
mailing list