1
0
Fork 0
mirror of https://github.com/alfg/mp4-rust.git synced 2024-05-19 08:48:04 +00:00

Default VmhdBox flags to 1 to fix Android H.264 playback issues.

This commit is contained in:
Matt Crane 2023-10-12 12:09:24 -04:00
parent 35560e94f5
commit aeec0f8557

View file

@ -4,7 +4,7 @@ use std::io::{Read, Seek, Write};
use crate::mp4box::*;
#[derive(Debug, Clone, PartialEq, Eq, Default, Serialize)]
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
pub struct VmhdBox {
pub version: u8,
pub flags: u32,
@ -29,6 +29,17 @@ impl VmhdBox {
}
}
impl Default for VmhdBox {
fn default() -> Self {
Self {
version: 0,
flags: 1,
graphics_mode: 0,
op_color: RgbColor::default(),
}
}
}
impl Mp4Box for VmhdBox {
fn box_type(&self) -> BoxType {
self.get_type()