[vlc-devel] [PATCH 20/34] mkv: cleanup of matroska_segment_c::ParseTrackEntry

Filip Roséen filip at videolabs.io
Fri May 6 19:08:59 CEST 2016


A few more lines, but far easier to read; and we should definitely
prefer maintainability instead of striving for just as few LOCs as
possible.
---
 modules/demux/mkv/matroska_segment_parse.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp
index c8c6b60..ae84a71 100644
--- a/modules/demux/mkv/matroska_segment_parse.cpp
+++ b/modules/demux/mkv/matroska_segment_parse.cpp
@@ -596,7 +596,10 @@ void matroska_segment_c::ParseTrackEntry( KaxTrackEntry *m )
         }
         E_CASE( KaxAudioSamplingFreq, afreq )
         {
-            vars.tk->i_original_rate = vars.tk->fmt.audio.i_rate = static_cast<float>( afreq );
+            float const value = static_cast<float>( afreq );
+
+            vars.tk->i_original_rate  = value;
+            vars.tk->fmt.audio.i_rate = value;
             debug( vars, "afreq=%d", vars.tk->fmt.audio.i_rate ) ;
         }
         E_CASE( KaxAudioOutputSamplingFreq, afreq )
-- 
2.8.2



More information about the vlc-devel mailing list