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); |
}; |