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

Side by Side Diff: media/filters/chunk_demuxer.cc

Issue 710693003: Report PIPELINE_ERROR_DECODE when SourceState::Append fails. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 11 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 | « media/base/pipeline.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/filters/chunk_demuxer.h" 5 #include "media/filters/chunk_demuxer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <list> 9 #include <list>
10 10
(...skipping 1330 matching lines...) Expand 10 before | Expand all | Expand 10 after
1341 // parsing. 1341 // parsing.
1342 bool old_waiting_for_data = IsSeekWaitingForData_Locked(); 1342 bool old_waiting_for_data = IsSeekWaitingForData_Locked();
1343 1343
1344 if (length == 0u) 1344 if (length == 0u)
1345 return; 1345 return;
1346 1346
1347 DCHECK(data); 1347 DCHECK(data);
1348 1348
1349 switch (state_) { 1349 switch (state_) {
1350 case INITIALIZING: 1350 case INITIALIZING:
1351 DCHECK(IsValidId(id));
1352 if (!source_state_map_[id]->Append(data, length,
1353 append_window_start,
1354 append_window_end,
1355 timestamp_offset,
1356 init_segment_received_cb)) {
1357 ReportError_Locked(DEMUXER_ERROR_COULD_NOT_OPEN);
1358 return;
1359 }
1360 break;
1361
1362 case INITIALIZED: { 1351 case INITIALIZED: {
wolenetz 2015/01/24 01:13:41 nit: is enclosure of case in {} necessary? It seem
1363 DCHECK(IsValidId(id)); 1352 DCHECK(IsValidId(id));
1364 if (!source_state_map_[id]->Append(data, length, 1353 if (!source_state_map_[id]->Append(data, length,
1365 append_window_start, 1354 append_window_start,
1366 append_window_end, 1355 append_window_end,
1367 timestamp_offset, 1356 timestamp_offset,
1368 init_segment_received_cb)) { 1357 init_segment_received_cb)) {
1369 ReportError_Locked(PIPELINE_ERROR_DECODE); 1358 ReportError_Locked(PIPELINE_ERROR_DECODE);
1370 return; 1359 return;
1371 } 1360 }
1372 } break; 1361 } break;
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
1853 } 1842 }
1854 1843
1855 void ChunkDemuxer::ShutdownAllStreams() { 1844 void ChunkDemuxer::ShutdownAllStreams() {
1856 for (SourceStateMap::iterator itr = source_state_map_.begin(); 1845 for (SourceStateMap::iterator itr = source_state_map_.begin();
1857 itr != source_state_map_.end(); ++itr) { 1846 itr != source_state_map_.end(); ++itr) {
1858 itr->second->Shutdown(); 1847 itr->second->Shutdown();
1859 } 1848 }
1860 } 1849 }
1861 1850
1862 } // namespace media 1851 } // namespace media
OLDNEW
« no previous file with comments | « media/base/pipeline.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698