Log warning when receiving an H.264 containing IDR, but not SPS/PPS.
BUG=webrtc:8423 Change-Id: Ica8cb5062b9b8b4b7f2c0e569a5ce5d2dc9effc7 Reviewed-on: https://webrtc-review.googlesource.com/15220 Reviewed-by: Philip Eliasson <philipel@webrtc.org> Commit-Queue: Rasmus Brandt <brandtr@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20422}
This commit is contained in:
parent
d79314f9f9
commit
58b72914d8
@ -9,9 +9,13 @@
|
||||
*/
|
||||
|
||||
#include "modules/video_coding/frame_object.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include "common_video/h264/h264_common.h"
|
||||
#include "modules/video_coding/packet_buffer.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "system_wrappers/include/field_trial.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -103,6 +107,19 @@ RtpFrameObject::RtpFrameObject(PacketBuffer* packet_buffer,
|
||||
_frameType = kVideoFrameKey;
|
||||
frame_type_ = kVideoFrameKey;
|
||||
}
|
||||
if (contains_idr && (!contains_sps || !contains_pps)) {
|
||||
std::stringstream ss;
|
||||
ss << "Received H.264-IDR frame "
|
||||
<< "(SPS: " << contains_sps << ", PPS: " << contains_pps << "). ";
|
||||
if (sps_pps_idr_is_keyframe) {
|
||||
ss << "Treating as delta frame since WebRTC-SpsPpsIdrIsH264Keyframe is "
|
||||
"enabled.";
|
||||
} else {
|
||||
ss << "Treating as key frame since WebRTC-SpsPpsIdrIsH264Keyframe is "
|
||||
"disabled.";
|
||||
}
|
||||
LOG(LS_WARNING) << ss.str();
|
||||
}
|
||||
} else {
|
||||
_frameType = first_packet->frameType;
|
||||
frame_type_ = first_packet->frameType;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user