[vlc-commits] MP4: store DiscNumber and DiscTotal in meta

Jean-Baptiste Kempf git at videolan.org
Thu Aug 11 13:47:01 CEST 2016


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Aug 11 11:24:59 2016 +0200| [7f3ff61f0041ea57cc9936fd80cfd6d8b8970814] | committer: Jean-Baptiste Kempf

MP4: store DiscNumber and DiscTotal in meta

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

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

 modules/demux/mp4/meta.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/demux/mp4/meta.c b/modules/demux/mp4/meta.c
index 8abf1cf..8edc5c1 100644
--- a/modules/demux/mp4/meta.c
+++ b/modules/demux/mp4/meta.c
@@ -288,11 +288,11 @@ static void SetupmdirMeta( vlc_meta_t *p_meta, MP4_Box_t *p_box )
         if ( p_data && BOXDATA(p_data) && BOXDATA(p_data)->i_blob >= 6 &&
              BOXDATA(p_data)->e_wellknowntype == DATA_WKT_RESERVED )
         {
-            char psz_utf[5 + 5 + 4];
-            snprintf( psz_utf, sizeof( psz_utf ), "%"PRIu16" / %"PRIu16,
-                      GetWBE(&BOXDATA(p_data)->p_blob[2]),
-                      GetWBE(&BOXDATA(p_data)->p_blob[4]) );
-            vlc_meta_AddExtra( p_meta, N_("Disc"), psz_utf );
+            char psz_number[5];
+            snprintf( psz_number, sizeof( psz_number ), "%"PRIu16, GetWBE(&BOXDATA(p_data)->p_blob[2]) );
+            vlc_meta_Set( p_meta, vlc_meta_DiscNumber, psz_number );
+            snprintf( psz_number, sizeof( psz_number ), "%"PRIu16, GetWBE(&BOXDATA(p_data)->p_blob[4]) );
+            vlc_meta_Set( p_meta, vlc_meta_DiscTotal, psz_number );
         }
         break;
     }



More information about the vlc-commits mailing list