Index: media/filters/gpu_video_decoder.cc |
diff --git a/media/filters/gpu_video_decoder.cc b/media/filters/gpu_video_decoder.cc |
index 2e11d8786863c034b87f05dd097905f068276d53..6149959c173305ce4abadb109c5d4caaeda1dd65 100644 |
--- a/media/filters/gpu_video_decoder.cc |
+++ b/media/filters/gpu_video_decoder.cc |
@@ -541,12 +541,15 @@ void GpuVideoDecoder::PictureReady(const media::Picture& picture) { |
DCHECK(decoder_texture_target_); |
- bool opaque = IsOpaque(config_.format()); |
+ VideoPixelFormat pixel_format = vda_->GetOutputFormat(); |
+ if (pixel_format == PIXEL_FORMAT_UNKNOWN) { |
+ pixel_format = |
+ IsOpaque(config_.format()) ? PIXEL_FORMAT_XRGB : PIXEL_FORMAT_ARGB; |
+ } |
scoped_refptr<VideoFrame> frame(VideoFrame::WrapNativeTexture( |
- opaque ? PIXEL_FORMAT_XRGB : PIXEL_FORMAT_ARGB, |
- gpu::MailboxHolder(pb.texture_mailbox(0), gpu::SyncToken(), |
- decoder_texture_target_), |
+ pixel_format, gpu::MailboxHolder(pb.texture_mailbox(0), gpu::SyncToken(), |
+ decoder_texture_target_), |
BindToCurrentLoop(base::Bind( |
&GpuVideoDecoder::ReleaseMailbox, weak_factory_.GetWeakPtr(), |
factories_, picture.picture_buffer_id(), pb.texture_ids())), |