[vlc-commits] vout: track user-specified SAR

Rémi Denis-Courmont git at videolan.org
Sat Jan 26 19:51:15 CET 2019


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jan 26 13:27:58 2019 +0200| [ef3bbf7e2433b831e66aa73e11c7468a8ecc6156] | committer: Rémi Denis-Courmont

vout: track user-specified SAR

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ef3bbf7e2433b831e66aa73e11c7468a8ecc6156
---

 src/video_output/video_output.c  | 5 +++++
 src/video_output/vout_internal.h | 6 ++++++
 2 files changed, 11 insertions(+)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 12cc96b575..1aca086e62 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -224,6 +224,8 @@ static vout_thread_t *VoutCreate(vlc_object_t *object,
 
     sys->input = NULL;
     VoutFixFormat(&sys->original, cfg->fmt);
+    sys->source.dar.num = 0;
+    sys->source.dar.den = 0;
     sys->dpb_size = cfg->dpb_size;
     sys->snapshot = vout_snapshot_New();
     vout_statistic_Init(&sys->statistic);
@@ -699,6 +701,9 @@ void vout_ControlChangeSampleAspectRatio(vout_thread_t *vout,
     vout_thread_sys_t *sys = vout->p;
 
     vlc_mutex_lock(&sys->window_lock);
+    sys->source.dar.num = num;
+    sys->source.dar.den = den;
+
     vout_ControlUpdateWindowSize(vout);
     vlc_mutex_unlock(&sys->window_lock);
 
diff --git a/src/video_output/vout_internal.h b/src/video_output/vout_internal.h
index 88419bd16f..dfac5b6e59 100644
--- a/src/video_output/vout_internal.h
+++ b/src/video_output/vout_internal.h
@@ -64,6 +64,12 @@ struct vout_thread_sys_t
 
     /* */
     video_format_t  original;   /* Original format ie coming from the decoder */
+    struct {
+        struct {
+            unsigned num;
+            unsigned den;
+        } dar;
+    } source;
     unsigned        dpb_size;
 
     /* Snapshot interface */



More information about the vlc-commits mailing list