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

update mp4info example and track.

This commit is contained in:
Alf 2020-09-05 13:15:31 -07:00
parent 421d9e7606
commit e879500c1a
2 changed files with 6 additions and 2 deletions

View file

@ -130,7 +130,7 @@ fn subtitle_info(track: &Mp4Track) -> Result<String> {
track.box_type()?,
))
} else {
Ok("subtitle test".to_string())
Err(Error::InvalidData("tx3g box not found"))
}
}

View file

@ -17,6 +17,7 @@ use crate::mp4box::{
stsc::StscEntry,
stss::StssBox,
stts::SttsEntry,
tx3g::Tx3gBox,
vmhd::VmhdBox,
};
use crate::*;
@ -509,7 +510,10 @@ impl Mp4TrackWriter {
let mp4a = Mp4aBox::new(aac_config);
trak.mdia.minf.stbl.stsd.mp4a = Some(mp4a);
}
MediaConfig::TtxtConfig(ref _ttxt_config) => {}
MediaConfig::TtxtConfig(ref _ttxt_config) => {
let tx3g = Tx3gBox::default();
trak.mdia.minf.stbl.stsd.tx3g = Some(tx3g);
}
}
Ok(Mp4TrackWriter {
trak,