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

Unified Diff: media/formats/mp4/mp4_stream_parser.cc

Issue 342083002: MSE: Give decode error if MDAT discard peek fails (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comment+nit from PS1 Created 6 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/mp4/mp4_stream_parser.cc
diff --git a/media/formats/mp4/mp4_stream_parser.cc b/media/formats/mp4/mp4_stream_parser.cc
index ceefcfa963a0b5840593f13ae52531fde824f6a2..4d56a8c561c0ae37200ea391b41b0009523719ac 100644
--- a/media/formats/mp4/mp4_stream_parser.cc
+++ b/media/formats/mp4/mp4_stream_parser.cc
@@ -550,9 +550,11 @@ bool MP4StreamParser::SendAndFlushSamples(BufferQueue* audio_buffers,
bool MP4StreamParser::ReadAndDiscardMDATsUntil(const int64 offset) {
bool err = false;
while (mdat_tail_ < offset) {
- const uint8* buf;
- int size;
+ const uint8* buf = NULL;
+ int size = 0;
queue_.PeekAt(mdat_tail_, &buf, &size);
+ if (size <= 0)
+ return false;
FourCC type;
int box_sz;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698