Skip to content

Commit 1f6643a

Browse files
committed
Use sample builder data for webm audio
Previously it was using the raw rtp payload
1 parent 77bc1bb commit 1f6643a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ Check out the **[contributing wiki](https://github.com/pion/webrtc/wiki/Contribu
6363
* [EricSong](https://github.com/xsephiroth) - *Implement GstV4l2Alsa example*
6464
* [Tristan Matthews](https://github.com/tmatth)
6565
* [Alexey Kravtsov](https://github.com/alexey-kravtsov) - *GStreamer encoder tune*
66+
* [Tarrence van As](https://github.com/tarrencev) - *Webm saver fix*
6667

6768
### License
6869
MIT License - see [LICENSE](LICENSE) for full text

save-to-webm/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func (s *webmSaver) PushOpus(rtpPacket *rtp.Packet) {
6868
if s.audioWriter != nil {
6969
s.audioTimestamp += sample.Samples
7070
t := s.audioTimestamp / 48
71-
if _, err := s.audioWriter.Write(true, int64(t), rtpPacket.Payload); err != nil {
71+
if _, err := s.audioWriter.Write(true, int64(t), sample.Data); err != nil {
7272
panic(err)
7373
}
7474
}

0 commit comments

Comments
 (0)