Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/mp4box/vmhd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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()
Expand Down
Loading