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

Side by Side Diff: talk/app/webrtc/webrtcsdp.cc

Issue 1228913003: Remove empty-string comparisons. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/modules/audio_processing/test/audio_processing_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 2174 matching lines...) Expand 10 before | Expand all | Expand 10 after
2185 } 2185 }
2186 2186
2187 std::string protocol = fields[2]; 2187 std::string protocol = fields[2];
2188 2188
2189 // <fmt> 2189 // <fmt>
2190 std::vector<int> codec_preference; 2190 std::vector<int> codec_preference;
2191 if (IsRtp(protocol)) { 2191 if (IsRtp(protocol)) {
2192 for (size_t j = 3 ; j < fields.size(); ++j) { 2192 for (size_t j = 3 ; j < fields.size(); ++j) {
2193 // TODO(wu): Remove when below bug is fixed. 2193 // TODO(wu): Remove when below bug is fixed.
2194 // https://bugzilla.mozilla.org/show_bug.cgi?id=996329 2194 // https://bugzilla.mozilla.org/show_bug.cgi?id=996329
2195 if (fields[j] == "" && j == fields.size() - 1) { 2195 if (fields[j].empty() && j == fields.size() - 1) {
2196 continue; 2196 continue;
2197 } 2197 }
2198 2198
2199 int pl = 0; 2199 int pl = 0;
2200 if (!GetPayloadTypeFromString(line, fields[j], &pl, error)) { 2200 if (!GetPayloadTypeFromString(line, fields[j], &pl, error)) {
2201 return false; 2201 return false;
2202 } 2202 }
2203 codec_preference.push_back(pl); 2203 codec_preference.push_back(pl);
2204 } 2204 }
2205 } 2205 }
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
3098 UpdateCodec<AudioContentDescription, cricket::AudioCodec>( 3098 UpdateCodec<AudioContentDescription, cricket::AudioCodec>(
3099 media_desc, payload_type, feedback_param); 3099 media_desc, payload_type, feedback_param);
3100 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) { 3100 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) {
3101 UpdateCodec<VideoContentDescription, cricket::VideoCodec>( 3101 UpdateCodec<VideoContentDescription, cricket::VideoCodec>(
3102 media_desc, payload_type, feedback_param); 3102 media_desc, payload_type, feedback_param);
3103 } 3103 }
3104 return true; 3104 return true;
3105 } 3105 }
3106 3106
3107 } // namespace webrtc 3107 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/audio_processing/test/audio_processing_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698