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

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

Issue 256583006: Fix possible buffer emission during an abort. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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
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 #ifndef MEDIA_FILTERS_CHUNK_DEMUXER_H_ 5 #ifndef MEDIA_FILTERS_CHUNK_DEMUXER_H_
6 #define MEDIA_FILTERS_CHUNK_DEMUXER_H_ 6 #define MEDIA_FILTERS_CHUNK_DEMUXER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 // |append_window_start| and |append_window_end| correspond to the MSE spec's 213 // |append_window_start| and |append_window_end| correspond to the MSE spec's
214 // similarly named source buffer attributes that are used in coded frame 214 // similarly named source buffer attributes that are used in coded frame
215 // processing. 215 // processing.
216 void AppendData(const std::string& id, const uint8* data, size_t length, 216 void AppendData(const std::string& id, const uint8* data, size_t length,
217 base::TimeDelta append_window_start, 217 base::TimeDelta append_window_start,
218 base::TimeDelta append_window_end, 218 base::TimeDelta append_window_end,
219 base::TimeDelta* timestamp_offset); 219 base::TimeDelta* timestamp_offset);
220 220
221 // Aborts parsing the current segment and reset the parser to a state where 221 // Aborts parsing the current segment and reset the parser to a state where
222 // it can accept a new segment. 222 // it can accept a new segment.
223 void Abort(const std::string& id); 223 // Some pending frames can be emitted during that process. These frames are
224 // applied |timestamp_offset|.
225 void Abort(const std::string& id, base::TimeDelta timestamp_offset);
224 226
225 // Remove buffers between |start| and |end| for the source buffer 227 // Remove buffers between |start| and |end| for the source buffer
226 // associated with |id|. 228 // associated with |id|.
227 void Remove(const std::string& id, base::TimeDelta start, 229 void Remove(const std::string& id, base::TimeDelta start,
228 base::TimeDelta end); 230 base::TimeDelta end);
229 231
230 // Returns the current presentation duration. 232 // Returns the current presentation duration.
231 double GetDuration(); 233 double GetDuration();
232 double GetDuration_Locked(); 234 double GetDuration_Locked();
233 235
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 380
379 // Indicates that splice frame generation is enabled. 381 // Indicates that splice frame generation is enabled.
380 const bool splice_frames_enabled_; 382 const bool splice_frames_enabled_;
381 383
382 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); 384 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer);
383 }; 385 };
384 386
385 } // namespace media 387 } // namespace media
386 388
387 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ 389 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698