修复拉取指定流时时长信息丢失的问题 (#3500)

This commit is contained in:
yanggs 2024-05-01 13:19:47 +08:00 committed by GitHub
parent 86348b86ee
commit 046aaa3498
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -210,7 +210,8 @@ void RtspPlayer::handleResDESCRIBE(const Parser &parser) {
if (play_track != TrackInvalid) { if (play_track != TrackInvalid) {
auto track = sdpParser.getTrack(play_track); auto track = sdpParser.getTrack(play_track);
_sdp_track.emplace_back(track); _sdp_track.emplace_back(track);
sdp = track->toString(); auto title_track = sdpParser.getTrack(TrackTitle);
sdp = (title_track ? title_track->toString() : "") + track->toString();
} else { } else {
_sdp_track = sdpParser.getAvailableTrack(); _sdp_track = sdpParser.getAvailableTrack();
sdp = sdpParser.toString(); sdp = sdpParser.toString();