minor fixes with init fragment
This commit is contained in:
parent
5c323970a3
commit
691d5dd67e
3 changed files with 5 additions and 4 deletions
|
@ -62,11 +62,12 @@ impl HLSHandler {
|
|||
let playlist_string = format!("\
|
||||
#EXTM3U\n\
|
||||
#EXT-X-VERSION:7\n\
|
||||
#EXT-X-TARGETDURATION:{}\n\
|
||||
#EXT-X-MEDIA-SEQUENCE:{}\n\
|
||||
#EXT-X-MAP:URI=\"{}init.mp4\"\n\
|
||||
{}\
|
||||
#EXT-X-ENDLIST\
|
||||
", self.curr_media_seq_idx, self.args.segment_prepend.clone(), segment_listing);
|
||||
", self.args.segment_time, self.curr_media_seq_idx, self.args.segment_prepend.clone(), segment_listing);
|
||||
|
||||
let mut f = fs::File::create("stream.m3u8").unwrap();
|
||||
f.write_all(&playlist_string.as_bytes());
|
||||
|
|
|
@ -225,7 +225,7 @@ impl Default for TKHD {
|
|||
fn default() -> Self {
|
||||
TKHD {
|
||||
version: 0,
|
||||
flags: 1,
|
||||
flags: 3,
|
||||
create_time: 0,
|
||||
modify_time: 0,
|
||||
track_id: 0,
|
||||
|
@ -435,7 +435,7 @@ impl Default for VMHD {
|
|||
fn default() -> Self {
|
||||
VMHD {
|
||||
version: 0,
|
||||
flags: 0,
|
||||
flags: 1,
|
||||
mode: 0,
|
||||
opcolor: [0,0,0],
|
||||
}
|
||||
|
|
|
@ -131,7 +131,7 @@ fn get_opus_stsd(sample: Vec<u8>, metadata: &Arc<util::Metadata>) -> mp4::atoms:
|
|||
dref_idx: 1,
|
||||
channels: metadata.audio.channels as u16,
|
||||
sample_size: 16,
|
||||
sample_rate: metadata.audio.samplerate,
|
||||
sample_rate: metadata.audio.samplerate << 16,
|
||||
codec_config: mp4::atoms::CodecConfig { atom_name: *b"dOps", data: opus_binding}
|
||||
};
|
||||
return mp4::atoms::STSD {
|
||||
|
|
Loading…
Reference in a new issue