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

Unified Diff: media/filters/ffmpeg_demuxer.h

Issue 353563002: Fix corrupted audio and video at playback start in ogg containers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove file code. 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 | media/filters/ffmpeg_demuxer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_demuxer.h
diff --git a/media/filters/ffmpeg_demuxer.h b/media/filters/ffmpeg_demuxer.h
index ca38f1b92294f345235e16be1d68f1144c74fc46..efe40321727638af0c1fce58aecea35a5be6d5db 100644
--- a/media/filters/ffmpeg_demuxer.h
+++ b/media/filters/ffmpeg_demuxer.h
@@ -58,12 +58,7 @@ class FFmpegDemuxerStream : public DemuxerStream {
public:
// Keeps a copy of |demuxer| and initializes itself using information inside
// |stream|. Both parameters must outlive |this|.
- // |discard_negative_timestamps| tells the DemuxerStream that all packets with
- // negative timestamps should be marked for post-decode discard. All decoded
- // data before time zero will be discarded.
- FFmpegDemuxerStream(FFmpegDemuxer* demuxer,
- AVStream* stream,
- bool discard_negative_timestamps);
+ FFmpegDemuxerStream(FFmpegDemuxer* demuxer, AVStream* stream);
virtual ~FFmpegDemuxerStream();
// Enqueues the given AVPacket. It is invalid to queue a |packet| after
@@ -82,6 +77,14 @@ class FFmpegDemuxerStream : public DemuxerStream {
base::TimeDelta duration() const { return duration_; }
+ // Enables fixes for ogg files with negative timestamps. For AUDIO streams,
+ // all packets with negative timestamps will be marked for post-decode
+ // discard. For all other stream types, if FFmpegDemuxer::start_time() is
+ // negative, it will not be used to shift timestamps during EnqueuePacket().
+ void enable_negative_timestamp_fixups_for_ogg() {
+ fixup_negative_ogg_timestamps_ = true;
+ }
+
// DemuxerStream implementation.
virtual Type type() OVERRIDE;
virtual void Read(const ReadCB& read_cb) OVERRIDE;
@@ -141,7 +144,7 @@ class FFmpegDemuxerStream : public DemuxerStream {
bool bitstream_converter_enabled_;
std::string encryption_key_id_;
- const bool discard_negative_timestamps_;
+ bool fixup_negative_ogg_timestamps_;
DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxerStream);
};
« no previous file with comments | « no previous file | media/filters/ffmpeg_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698