Skip to content

Commit af76dc2

Browse files
committed
Allow truncated DECODER_SPECIFIC_TAG entries outside of strict mode.
1 parent 69bca18 commit af76dc2

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

mp4parse/src/lib.rs

+11-3
Original file line numberDiff line numberDiff line change
@@ -5011,9 +5011,17 @@ fn find_descriptor(
50115011
DECODER_CONFIG_TAG => {
50125012
read_dc_descriptor(descriptor, esds, strictness)?;
50135013
}
5014-
DECODER_SPECIFIC_TAG => {
5015-
read_ds_descriptor(descriptor, esds, strictness)?;
5016-
}
5014+
DECODER_SPECIFIC_TAG => match read_ds_descriptor(descriptor, esds, strictness) {
5015+
Ok(()) => {}
5016+
Err(Error::InvalidData(Status::BitReaderError))
5017+
if strictness != ParseStrictness::Strict =>
5018+
{
5019+
debug!("Unexpected EOS parsing ds descriptor in non-strict mode");
5020+
}
5021+
Err(e) => {
5022+
return Err(e);
5023+
}
5024+
},
50175025
_ => {
50185026
debug!("Unsupported descriptor, tag {}", tag);
50195027
}

0 commit comments

Comments
 (0)