mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
merge after backing out changeset e6566d187edd
This commit is contained in:
commit
4645e0a141
@ -203,15 +203,10 @@ void nsMediaDecoder::SetRGBData(PRInt32 aWidth, PRInt32 aHeight, float aFramerat
|
||||
}
|
||||
mFramerate = aFramerate;
|
||||
|
||||
if (aRGBBuffer) {
|
||||
if (!mRGB) {
|
||||
mRGB = new unsigned char[aWidth * aHeight * 4];
|
||||
}
|
||||
if (mRGB) {
|
||||
memcpy(mRGB.get(), aRGBBuffer, aWidth*aHeight*4);
|
||||
}
|
||||
} else {
|
||||
mRGB = nsnull;
|
||||
if (!mRGB)
|
||||
mRGB = new unsigned char[aWidth * aHeight * 4];
|
||||
if (mRGB && aRGBBuffer) {
|
||||
memcpy(mRGB.get(), aRGBBuffer, aWidth*aHeight*4);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1094,20 +1094,11 @@ void nsOggDecodeStateMachine::LoadOggHeaders()
|
||||
if (mVideoTrack == -1 && oggplay_get_track_type(mPlayer, i) == OGGZ_CONTENT_THEORA) {
|
||||
oggplay_set_callback_num_frames(mPlayer, i, 1);
|
||||
mVideoTrack = i;
|
||||
|
||||
int fpsd, fpsn;
|
||||
oggplay_get_video_fps(mPlayer, i, &fpsd, &fpsn);
|
||||
mFramerate = fpsd == 0 ? 0.0 : float(fpsn)/float(fpsd);
|
||||
mCallbackPeriod = 1.0 / mFramerate;
|
||||
LOG(PR_LOG_DEBUG, ("Frame rate: %f", mFramerate));
|
||||
|
||||
int y_width;
|
||||
int y_height;
|
||||
oggplay_get_video_y_size(mPlayer, i, &y_width, &y_height);
|
||||
{
|
||||
nsAutoLock lock(mDecoder->mVideoUpdateLock);
|
||||
mDecoder->SetRGBData(y_width, y_height, mFramerate, nsnull);
|
||||
}
|
||||
}
|
||||
else if (mAudioTrack == -1 && oggplay_get_track_type(mPlayer, i) == OGGZ_CONTENT_VORBIS) {
|
||||
mAudioTrack = i;
|
||||
@ -1456,11 +1447,6 @@ void nsOggDecoder::MetadataLoaded()
|
||||
}
|
||||
|
||||
if (mElement && notifyElement) {
|
||||
{
|
||||
nsAutoLock lock(mVideoUpdateLock);
|
||||
mElement->UpdateMediaSize(nsIntSize(mRGBWidth, mRGBHeight));
|
||||
mSizeChanged = PR_FALSE;
|
||||
}
|
||||
mElement->MetadataLoaded();
|
||||
}
|
||||
|
||||
|
@ -53,8 +53,6 @@ function loadedData() {
|
||||
function loadedMetaData() {
|
||||
gLoadedMetaDataCount++;
|
||||
ok(gLoadedMetaDataCount <= 1, "No more than 1 onloadedmetadata events");
|
||||
is(video().videoWidth, 320, "width is available");
|
||||
is(video().videoHeight, 240, "height is available");
|
||||
video().play();
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user