Skip to content

Commit

Permalink
add ac-3/ec-3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
nvkhoi112358 committed Dec 23, 2024
1 parent 14e9f6d commit 2610d1b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/cmaf-ingest-receiver/app/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func (ch *channel) addInitDataAndUpdateTimescale(stream stream, init *mp4.InitSe

ch.addTrData(r)
switch sampleEntry {
case "avc1", "hvc1", "mp4a", "stpp", "wvtt":
case "avc1", "hvc1", "mp4a", "stpp", "wvtt", "ac-3", "ec-3":
// OK
case "evte": // Event stream. Don't add to MPD or contentinfo, but keep the segments.
// TODO. Handle event streams for SCTE-35 events and other cases
Expand Down
2 changes: 2 additions & 0 deletions cmd/livesim2/app/asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,8 @@ func (r RepData) sampleDur() uint32 {
switch {
case strings.HasPrefix(r.Codecs, "mp4a.40") && r.MediaTimescale == 48000:
return 1024
case (strings.HasPrefix(r.Codecs, "ac-3") || strings.HasPrefix(r.Codecs, "ec-3")) && r.MediaTimescale == 48000:
return 1536
default:
return 0
}
Expand Down

0 comments on commit 2610d1b

Please sign in to comment.