[vlc-commits] demux: mkv: don't use psz prefix with std::string type

Zhao Zhili git at videolan.org
Mon May 28 10:20:09 CEST 2018


vlc | branch: master | Zhao Zhili <quinkblack at foxmail.com> | Sun May 27 23:09:31 2018 +0800| [f57dce91c47d34be0994bbbd375e6e664aeafd36] | committer: Steve Lhomme

demux: mkv: don't use psz prefix with std::string type

Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>

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

 modules/demux/mkv/chapters.hpp               |  2 +-
 modules/demux/mkv/matroska_segment_parse.cpp |  6 +++---
 modules/demux/mkv/mkv.hpp                    | 14 +++++++-------
 modules/demux/mkv/virtual_segment.cpp        |  8 ++++----
 4 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/modules/demux/mkv/chapters.hpp b/modules/demux/mkv/chapters.hpp
index a069b1fdea..ee4c186912 100644
--- a/modules/demux/mkv/chapters.hpp
+++ b/modules/demux/mkv/chapters.hpp
@@ -79,7 +79,7 @@ public:
     int64_t                     i_uid;
     bool                        b_display_seekpoint;
     bool                        b_user_display;
-    std::string                 psz_name;
+    std::string                 str_name;
     chapter_item_c              *p_parent;
     bool                        b_is_leaving;
 
diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp
index 752bf58bb4..6aafe8f552 100644
--- a/modules/demux/mkv/matroska_segment_parse.cpp
+++ b/modules/demux/mkv/matroska_segment_parse.cpp
@@ -1190,10 +1190,10 @@ void matroska_segment_c::ParseChapterAtom( int i_level, KaxChapterAtom *ca, chap
             char *psz_tmp_utf8 = ToUTF8( UTFstring( name ) );
 
             for ( int k = 0; k < vars.i_level; k++)
-                vars.chapters.psz_name += '+';
+                vars.chapters.str_name += '+';
 
-            vars.chapters.psz_name += ' ';
-            vars.chapters.psz_name += psz_tmp_utf8;
+            vars.chapters.str_name += ' ';
+            vars.chapters.str_name += psz_tmp_utf8;
             vars.chapters.b_user_display = true;
 
             debug( vars, "ChapterString=%s", psz_tmp_utf8 );
diff --git a/modules/demux/mkv/mkv.hpp b/modules/demux/mkv/mkv.hpp
index ad48219a88..90be75902f 100644
--- a/modules/demux/mkv/mkv.hpp
+++ b/modules/demux/mkv/mkv.hpp
@@ -124,10 +124,10 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
 class attachment_c
 {
 public:
-    attachment_c( const std::string& _psz_file_name, const std::string& _psz_mime_type, int _i_size )
+    attachment_c( const std::string& _str_file_name, const std::string& _str_mime_type, int _i_size )
         :i_size(_i_size)
-        ,psz_file_name( _psz_file_name)
-        ,psz_mime_type( _psz_mime_type)
+        ,str_file_name( _str_file_name)
+        ,str_mime_type( _str_mime_type)
     {
         p_data = NULL;
     }
@@ -140,15 +140,15 @@ public:
         return (p_data != NULL);
     }
 
-    const char* fileName() const { return psz_file_name.c_str(); }
-    const char* mimeType() const { return psz_mime_type.c_str(); }
+    const char* fileName() const { return str_file_name.c_str(); }
+    const char* mimeType() const { return str_mime_type.c_str(); }
     int         size() const    { return i_size; }
 
     void          *p_data;
 private:
     int            i_size;
-    std::string    psz_file_name;
-    std::string    psz_mime_type;
+    std::string    str_file_name;
+    std::string    str_mime_type;
 };
 
 class matroska_segment_c;
diff --git a/modules/demux/mkv/virtual_segment.cpp b/modules/demux/mkv/virtual_segment.cpp
index adf8ea8e18..c9987bb3e8 100644
--- a/modules/demux/mkv/virtual_segment.cpp
+++ b/modules/demux/mkv/virtual_segment.cpp
@@ -57,7 +57,7 @@ virtual_chapter_c * virtual_chapter_c::CreateVirtualChapter( chapter_item_c * p_
     {
         msg_Warn( &main_segment.sys.demuxer,
                   "Couldn't find segment 0x%x or not ordered... - ignoring chapter %s",
-                  *( (uint32_t *) p_chap->p_segment_uid->GetBuffer() ),p_chap->psz_name.c_str() );
+                  *( (uint32_t *) p_chap->p_segment_uid->GetBuffer() ),p_chap->str_name.c_str() );
         return NULL;
     }
 
@@ -94,7 +94,7 @@ virtual_chapter_c * virtual_chapter_c::CreateVirtualChapter( chapter_item_c * p_
 
     msg_Dbg( &main_segment.sys.demuxer,
              "Virtual chapter %s from %" PRId64 " to %" PRId64 " - " ,
-             p_chap->psz_name.c_str(), p_vchap->i_mk_virtual_start_time, p_vchap->i_mk_virtual_stop_time );
+             p_chap->str_name.c_str(), p_vchap->i_mk_virtual_start_time, p_vchap->i_mk_virtual_stop_time );
 
     return p_vchap;
 }
@@ -594,7 +594,7 @@ int virtual_chapter_c::PublishChapters( input_title_t & title, int & i_user_chap
     {
         std::string chap_name;
         if ( p_chapter->b_user_display )
-            chap_name = p_chapter->psz_name;
+            chap_name = p_chapter->str_name;
         if (chap_name == "")
             chap_name = p_chapter->GetCodecName();
 
@@ -633,7 +633,7 @@ int virtual_edition_c::PublishChapters( input_title_t & title, int & i_user_chap
     {
         seekpoint_t *sk = vlc_seekpoint_New();
         sk->i_time_offset = 0;
-        sk->psz_name = strdup( p_edition->psz_name.c_str() );
+        sk->psz_name = strdup( p_edition->str_name.c_str() );
 
         title.i_seekpoint++;
         title.seekpoint = static_cast<seekpoint_t**>( xrealloc( title.seekpoint,



More information about the vlc-commits mailing list