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
--- a/dom/media/webm/WebMDemuxer.cpp
+++ b/dom/media/webm/WebMDemuxer.cpp
@@ -577,21 +577,17 @@ WebMDemuxer::GetNextPacket(TrackInfo::Tr
}
isKeyframe = si.is_kf;
if (isKeyframe) {
// We only look for resolution changes on keyframes for both VP8 and
// VP9. Other resolution changes are invalid.
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);
mLastSeenFrameHeight = Some(si.h);
}
}
WEBM_DEBUG("push sample tstamp: %ld next_tstamp: %ld length: %ld kf: %d",