[vlc-commits] demux: mkv: fix unscoped switch-case body
Filip Roséen
git at videolan.org
Mon Jul 16 12:46:37 CEST 2018
vlc | branch: master | Filip Roséen <filip at atch.se> | Mon Jul 16 05:19:54 2018 +0200| [9876ceb51290d6d910cd28aa40a87346a101b169] | committer: Steve Lhomme
demux: mkv: fix unscoped switch-case body
A switch-case that introduces variables should be scoped, as it
otherwise is ill-formed to add another case after it.
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9876ceb51290d6d910cd28aa40a87346a101b169
---
modules/demux/mkv/mkv.cpp | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index 220a061e57..d58bf48624 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -631,11 +631,13 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
break;
case VLC_CODEC_OPUS:
- vlc_tick_t i_length = i_duration * track. f_timecodescale *
- (double) p_segment->i_timescale / 1000.0;
- if ( i_length < 0 ) i_length = 0;
- p_block->i_nb_samples = i_length * track.fmt.audio.i_rate
- / CLOCK_FREQ;
+ {
+ vlc_tick_t i_length = i_duration * track. f_timecodescale *
+ (double) p_segment->i_timescale / 1000.0;
+ if ( i_length < 0 ) i_length = 0;
+ p_block->i_nb_samples = i_length * track.fmt.audio.i_rate
+ / CLOCK_FREQ;
+ }
break;
}
More information about the vlc-commits
mailing list