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

Support FFmpeg timecode, fix AMF0 parsing failed. v5.0.179 v6.0.77 #3804

Merged
merged 4 commits into from
Sep 18, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions trunk/src/protocol/srs_protocol_rtmp_stack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <srs_protocol_stream.hpp>
#include <srs_protocol_utility.hpp>
#include <srs_protocol_rtmp_handshake.hpp>
#include <srs_app_utility.hpp>

// for srs-librtmp, @see https://github.com/ossrs/srs/issues/213
#ifndef _WIN32
Expand Down Expand Up @@ -595,6 +596,12 @@ srs_error_t SrsProtocol::do_decode_message(SrsMessageHeader& header, SrsBuffer*

// decode specified packet type
if (header.is_amf0_command() || header.is_amf3_command() || header.is_amf0_data() || header.is_amf3_data()) {
// Ignore FFmpeg timecode, see https://github.com/ossrs/srs/issues/3803
if (stream->left() == 4 && (uint8_t)*stream->head() == 0x00) {
winlinvip marked this conversation as resolved.
Show resolved Hide resolved
srs_warn("Ignore FFmpeg timecode, data=[%s]", srs_string_dumps_hex(stream->head(), 4).c_str());
return err;
}

// skip 1bytes to decode the amf3 command.
if (header.is_amf3_command() && stream->require(1)) {
stream->skip(1);
Expand Down
Loading