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

Need to set video time base before pushing packets. #1109

Merged
merged 1 commit into from Jan 4, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions erizo/src/erizo/media/ExternalOutput.cpp
Expand Up @@ -465,16 +465,18 @@ void ExternalOutput::queueData(char* buffer, int length, packetType type) {
}

if (type == VIDEO_PACKET) {
RtpHeader* h = reinterpret_cast<RtpHeader*>(buffer);
uint8_t payloadtype = h->getPayloadType();
if (video_offset_ms_ == -1) {
video_offset_ms_ = ClockUtils::durationToMs(clock::now() - first_data_received_);
ELOG_DEBUG("File %s, video offset msec: %llu", context_->filename, video_offset_ms_);
video_queue_.setTimebase(video_maps_[payloadtype].clock_rate);
}

// If this is a red header, let's push it to our fec_receiver_, which will spit out frames in one
// of our other callbacks.
// Otherwise, just stick it straight into the video queue.
RtpHeader* h = reinterpret_cast<RtpHeader*>(buffer);
if (h->getPayloadType() == RED_90000_PT) {
if (payloadtype == RED_90000_PT) {
// The only things AddReceivedRedPacket uses are headerLength and sequenceNumber.
// Unfortunately the amount of crap
// we would have to pull in from the WebRtc project to fully construct
Expand Down