Index: media/mp4/mp4_stream_parser.cc |
diff --git a/media/mp4/mp4_stream_parser.cc b/media/mp4/mp4_stream_parser.cc |
index 4f4a6db12818e03483bb2cfd59f884b4d94714b2..e16d81d879e9aafa70bcaa66c6e6de9c958efbaf 100644 |
--- a/media/mp4/mp4_stream_parser.cc |
+++ b/media/mp4/mp4_stream_parser.cc |
@@ -76,6 +76,19 @@ bool MP4StreamParser::Parse(const uint8* buf, int size) { |
do { |
if (state_ == kParsingBoxes) { |
+ // Flush any buffers we've gotten in this chunk so that buffers don't |
acolwell GONE FROM CHROMIUM
2012/06/25 21:22:16
It might be clearer to place this logic in Enqueue
strobe_
2012/06/26 00:37:59
Done.
|
+ // cross NewSegment() calls |
+ if (!audio_buffers.empty()) { |
acolwell GONE FROM CHROMIUM
2012/06/25 21:22:16
This isn't sufficient. You need to do all the same
strobe_
2012/06/26 00:37:59
What checks are missing here as compared to below?
acolwell GONE FROM CHROMIUM
2012/06/26 15:25:14
Sorry. The CHECK/DCHECK here was actually inapprop
|
+ CHECK(!audio_cb_.is_null()); |
acolwell GONE FROM CHROMIUM
2012/06/25 21:22:16
Use DCHECK here and below. Let the null pointer ex
strobe_
2012/06/26 00:37:59
Done. (well, moved into the shared error condition
|
+ RCHECK(audio_cb_.Run(audio_buffers)); |
+ audio_buffers.clear(); |
+ } |
+ if (!video_buffers.empty()) { |
+ CHECK(!video_cb_.is_null()); |
+ RCHECK(video_cb_.Run(video_buffers)); |
+ video_buffers.clear(); |
+ } |
+ |
if (mdat_tail_ > queue_.head()) { |
result = queue_.Trim(mdat_tail_); |
} else { |