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

Steve Lhomme git at videolan.org
Thu Apr 13 14:56:27 CEST 2017


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Thu Apr  6 17:14:39 2017 +0200| [5b7c20a2fdfec37a81d7299bad40c313167bfa20] | 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.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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