Skip to content

Commit 9c72671

Browse files
committed
hevc: Cherry pick fixes from PR 408.
1 parent 32d142b commit 9c72671

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

mp4parse/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2061,7 +2061,7 @@ pub enum CodecType {
20612061
LPCM, // QT
20622062
ALAC,
20632063
H263,
2064-
HEVC,
2064+
HEVC, // 23008-2
20652065
#[cfg(feature = "3gpp")]
20662066
AMRNB,
20672067
#[cfg(feature = "3gpp")]
@@ -5571,7 +5571,9 @@ fn read_video_sample_entry<T: Read>(src: &mut BMFFBox<T>) -> Result<SampleEntry>
55715571
protection_info.push(sinf)?;
55725572
}
55735573
BoxType::HEVCConfigurationBox => {
5574-
if (name != BoxType::HEV1SampleEntry && name != BoxType::HVC1SampleEntry)
5574+
if (name != BoxType::HEV1SampleEntry
5575+
&& name != BoxType::HVC1SampleEntry
5576+
&& name != BoxType::ProtectedVisualSampleEntry)
55755577
|| codec_specific.is_some()
55765578
{
55775579
return Status::StsdBadVideoSampleEntry.into();

mp4parse_capi/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ pub enum Mp4parseCodec {
100100
Ec3,
101101
Alac,
102102
H263,
103-
HEVC,
103+
Hevc,
104104
#[cfg(feature = "3gpp")]
105105
AMRNB,
106106
#[cfg(feature = "3gpp")]
@@ -963,7 +963,7 @@ fn mp4parse_get_track_video_info_safe(
963963
VideoCodecSpecific::AV1Config(_) => Mp4parseCodec::Av1,
964964
VideoCodecSpecific::AVCConfig(_) => Mp4parseCodec::Avc,
965965
VideoCodecSpecific::H263Config(_) => Mp4parseCodec::H263,
966-
VideoCodecSpecific::HEVCConfig(_) => Mp4parseCodec::HEVC,
966+
VideoCodecSpecific::HEVCConfig(_) => Mp4parseCodec::Hevc,
967967
#[cfg(feature = "mp4v")]
968968
VideoCodecSpecific::ESDSConfig(_) => Mp4parseCodec::Mp4v,
969969
#[cfg(not(feature = "mp4v"))]

0 commit comments

Comments
 (0)