1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

fix #203, srs-librtmp drop any video before sps/pps(sequence header). 2.0.21.

This commit is contained in:
winlin 2014-11-15 16:30:37 +08:00
parent ecfbcd68d8
commit 278ff845d3
6 changed files with 50 additions and 13 deletions

View file

@ -166,9 +166,14 @@ int main(int argc, char** argv)
}
// send out the h264 packet over RTMP
if (srs_write_h264_raw_frames(rtmp, data, size, dts, pts) != 0) {
srs_lib_trace("send h264 raw data failed.");
goto rtmp_destroy;
int error = srs_h264_write_raw_frames(rtmp, data, size, dts, pts);
if (error != 0) {
if (srs_h264_is_dvbsp_error(error)) {
srs_lib_trace("ignore drop video error, code=%d", error);
} else {
srs_lib_trace("send h264 raw data failed.");
goto rtmp_destroy;
}
}
// 5bits, 7.3.1 NAL unit syntax,