Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(407)

Unified Diff: webrtc/common_video/h264/sps_vui_rewriter.cc

Issue 2265023002: Revert of Add pps id and sps id parsing to the h.264 depacketizer. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/common_video/h264/sps_vui_rewriter.cc
diff --git a/webrtc/common_video/h264/sps_vui_rewriter.cc b/webrtc/common_video/h264/sps_vui_rewriter.cc
index c5b9b706dff3e6dc66a047da1330c4999b8e2efc..447221327d40551cbd1c3a92a1446f721272cfd0 100644
--- a/webrtc/common_video/h264/sps_vui_rewriter.cc
+++ b/webrtc/common_video/h264/sps_vui_rewriter.cc
@@ -72,10 +72,7 @@
size_t length,
rtc::Optional<SpsParser::SpsState>* sps,
rtc::Buffer* destination) {
- // Create temporary RBSP decoded buffer of the payload (exlcuding the
- // leading nalu type header byte (the SpsParser uses only the payload).
- std::unique_ptr<rtc::Buffer> rbsp_buffer = H264::ParseRbsp(buffer, length);
- rtc::BitBuffer source_buffer(rbsp_buffer->data(), rbsp_buffer->size());
+ rtc::BitBuffer source_buffer(buffer, length);
rtc::Optional<SpsParser::SpsState> sps_state =
SpsParser::ParseSpsUpToVui(&source_buffer);
if (!sps_state)
@@ -97,7 +94,7 @@
size_t byte_offset;
size_t bit_offset;
source_buffer.GetCurrentOffset(&byte_offset, &bit_offset);
- memcpy(out_buffer.data(), rbsp_buffer->data(),
+ memcpy(out_buffer.data(), buffer,
byte_offset + (bit_offset > 0 ? 1 : 0)); // OK to copy the last bits.
// SpsParser will have read the vui_params_present flag, which we want to
« no previous file with comments | « webrtc/common_video/h264/sps_parser_unittest.cc ('k') | webrtc/common_video/h264/sps_vui_rewriter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698