Bug 1243538: [webm] P7. Let the decoder handle picture resizing. r=SingingTree

Is is now up to the decoders to automatically determine the correct size of the decoded frame.
By leaving the original dimensions in the VideoInfo, it will allow automatic rescale of the cropping window according to the original dimensions.

MozReview-Commit-ID: FZM4YlataNz
This commit is contained in:
Jean-Yves Avenard 2016-04-18 10:02:14 +10:00
parent 4af23f69bd
commit 0dc386ec98

View File

@ -582,11 +582,7 @@ WebMDemuxer::GetNextPacket(TrackInfo::TrackType aType, MediaRawDataQueue *aSampl
if (mLastSeenFrameWidth.isSome() && mLastSeenFrameHeight.isSome() &&
(si.w != mLastSeenFrameWidth.value() ||
si.h != mLastSeenFrameHeight.value())) {
// We ignore cropping information on resizes during streams.
// Cropping alone is rare, and we do not consider cropping to
// still be valid after a resolution change
mInfo.mVideo.mImage = mInfo.mVideo.mDisplay = nsIntSize(si.w, si.h);
mInfo.mVideo.SetImageRect(nsIntRect(0, 0, si.w, si.h));
mInfo.mVideo.mDisplay = nsIntSize(si.w, si.h);
mSharedVideoTrackInfo = new SharedTrackInfo(mInfo.mVideo, ++sStreamSourceID);
}
mLastSeenFrameWidth = Some(si.w);