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

Unified Diff: media/filters/ffmpeg_demuxer.cc

Issue 2448763002: FFmpegDemuxer: Clear |extra_data| when enabling bitstream conversion. (Closed)
Patch Set: Restore variant used by fuzzertest. Created 4 years, 2 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 | « media/base/video_decoder_config.cc ('k') | media/test/pipeline_integration_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_demuxer.cc
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index 2e296516203378ffdd5809ef496c3570bec4e262..78eba93f68b9c323b7145e310c16884ceaca6851 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -670,6 +670,15 @@ void FFmpegDemuxerStream::InitBitstreamConverter() {
#if defined(USE_PROPRIETARY_CODECS)
switch (stream_->codec->codec_id) {
case AV_CODEC_ID_H264:
+ // Clear |extra_data| so that future (fallback) decoders will know that
+ // conversion is forcibly enabled on this stream.
+ //
+ // TODO(sandersd): Ideally we would convert |extra_data| to concatenated
+ // SPS/PPS data, but it's too late to be useful because Initialize() was
+ // already called on GpuVideoDecoder, which is the only path that would
+ // consume that data.
+ if (video_config_)
+ video_config_->SetExtraData(std::vector<uint8_t>());
bitstream_converter_.reset(
new FFmpegH264ToAnnexBBitstreamConverter(stream_->codec));
break;
« no previous file with comments | « media/base/video_decoder_config.cc ('k') | media/test/pipeline_integration_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698