mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-01-04 09:15:05 +00:00
Avoid shadowing a variable resulting in wrong duration fields.
This commit is contained in:
parent
287315569b
commit
3e76dc01bc
@ -845,8 +845,10 @@ ogm_demuxer_c::get_duration_and_len(ogg_packet &op,
|
||||
duration_len = (*op.packet & PACKET_LEN_BITS01) >> 6;
|
||||
duration_len |= (*op.packet & PACKET_LEN_BITS2) << 1;
|
||||
|
||||
duration = 0;
|
||||
|
||||
if ((0 < duration_len) && (op.bytes >= (duration_len + 1))) {
|
||||
for (int i = 0, duration = 0; i < duration_len; i++) {
|
||||
for (int i = 0; i < duration_len; i++) {
|
||||
duration <<= 8;
|
||||
duration += *((unsigned char *)op.packet + duration_len - i);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user