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

Unified Diff: media/formats/mp2t/es_parser_adts.cc

Issue 399433003: Mpeg2 TS - Fail when no valid timestamp in the ADTS parser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 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/mp2t/es_parser_adts.cc
diff --git a/media/formats/mp2t/es_parser_adts.cc b/media/formats/mp2t/es_parser_adts.cc
index 433baabe5e674017fcbb2b150fcaefb9006d0a37..459ead215776e150c58cd5b35011a7e96308174a 100644
--- a/media/formats/mp2t/es_parser_adts.cc
+++ b/media/formats/mp2t/es_parser_adts.cc
@@ -151,6 +151,10 @@ bool EsParserAdts::Parse(const uint8* buf, int size,
pts_list_.pop_front();
}
+ if (audio_timestamp_helper_->base_timestamp() == kNoTimestamp()) {
+ DVLOG(1) << "Audio frame with unknown timestamp";
+ return false;
+ }
base::TimeDelta current_pts = audio_timestamp_helper_->GetTimestamp();
base::TimeDelta frame_duration =
audio_timestamp_helper_->GetFrameDuration(kSamplesPerAACFrame);
« 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