| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 } | 203 } |
| 204 | 204 |
| 205 if (frame->inter_layer_predicted && frame->spatial_layer == 0) { | 205 if (frame->inter_layer_predicted && frame->spatial_layer == 0) { |
| 206 LOG(LS_WARNING) << "Frame with (picture_id:spatial_id) (" << key.picture_id | 206 LOG(LS_WARNING) << "Frame with (picture_id:spatial_id) (" << key.picture_id |
| 207 << ":" << static_cast<int>(key.spatial_layer) | 207 << ":" << static_cast<int>(key.spatial_layer) |
| 208 << ") is marked as inter layer predicted, dropping frame."; | 208 << ") is marked as inter layer predicted, dropping frame."; |
| 209 return last_continuous_picture_id; | 209 return last_continuous_picture_id; |
| 210 } | 210 } |
| 211 | 211 |
| 212 if (last_decoded_frame_it_ != frames_.end() && | 212 if (last_decoded_frame_it_ != frames_.end() && |
| 213 key < last_decoded_frame_it_->first) { | 213 key <= last_decoded_frame_it_->first) { |
| 214 if (AheadOf(frame->timestamp, last_decoded_frame_timestamp_) && | 214 if (AheadOf(frame->timestamp, last_decoded_frame_timestamp_) && |
| 215 frame->num_references == 0) { | 215 frame->num_references == 0) { |
| 216 // If this frame has a newer timestamp but an earlier picture id then we | 216 // If this frame has a newer timestamp but an earlier picture id then we |
| 217 // assume there has been a jump in the picture id due to some encoder | 217 // assume there has been a jump in the picture id due to some encoder |
| 218 // reconfiguration or some other reason. Even though this is not according | 218 // reconfiguration or some other reason. Even though this is not according |
| 219 // to spec we can still continue to decode from this frame if it is a | 219 // to spec we can still continue to decode from this frame if it is a |
| 220 // keyframe. | 220 // keyframe. |
| 221 LOG(LS_WARNING) << "A jump in picture id was detected, clearing buffer."; | 221 LOG(LS_WARNING) << "A jump in picture id was detected, clearing buffer."; |
| 222 ClearFramesAndHistory(); | 222 ClearFramesAndHistory(); |
| 223 last_continuous_picture_id = -1; | 223 last_continuous_picture_id = -1; |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 frames_.clear(); | 440 frames_.clear(); |
| 441 last_decoded_frame_it_ = frames_.end(); | 441 last_decoded_frame_it_ = frames_.end(); |
| 442 last_continuous_frame_it_ = frames_.end(); | 442 last_continuous_frame_it_ = frames_.end(); |
| 443 next_frame_it_ = frames_.end(); | 443 next_frame_it_ = frames_.end(); |
| 444 num_frames_history_ = 0; | 444 num_frames_history_ = 0; |
| 445 num_frames_buffered_ = 0; | 445 num_frames_buffered_ = 0; |
| 446 } | 446 } |
| 447 | 447 |
| 448 } // namespace video_coding | 448 } // namespace video_coding |
| 449 } // namespace webrtc | 449 } // namespace webrtc |
| OLD | NEW |