[vlc-commits] decoder: update the output format when HDR10 metadata change

Steve Lhomme git at videolan.org
Thu Apr 13 14:47:19 CEST 2017


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Thu Apr  6 17:14:39 2017 +0200| [2b7d57c2038136ec80e71f69c43599c9fb375795] | committer: Jean-Baptiste Kempf

decoder: update the output format when HDR10 metadata change

So that the es_out can be updated and known to the user.

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

 src/input/decoder.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index cc6f210505..2aa7852a4f 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -496,6 +496,20 @@ static int vout_update_format( decoder_t *p_dec )
             return -1;
         }
     }
+
+    if ( memcmp( &p_dec->fmt_out.video.mastering,
+                 &p_owner->fmt.video.mastering,
+                 sizeof(p_owner->fmt.video.mastering)) ||
+         p_dec->fmt_out.video.ligthing.MaxCLL !=
+         p_owner->fmt.video.ligthing.MaxCLL ||
+         p_dec->fmt_out.video.ligthing.MaxFALL !=
+         p_owner->fmt.video.ligthing.MaxFALL)
+    {
+        /* the format has changed but we don't need a new vout */
+        vlc_mutex_lock( &p_owner->lock );
+        DecoderUpdateFormatLocked( p_dec );
+        vlc_mutex_unlock( &p_owner->lock );
+    }
     return 0;
 }
 



More information about the vlc-commits mailing list