mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 11:26:09 +00:00
Backed out changeset 571ec9b53caa (bug 1219134) on request from jya for problems with the FFmpeg
This commit is contained in:
parent
42a2e03f42
commit
657fae2cc0
@ -16,6 +16,8 @@
|
||||
#include "FFmpegLog.h"
|
||||
#include "mozilla/PodOperations.h"
|
||||
|
||||
#define GECKO_FRAME_TYPE 0x00093CC0
|
||||
|
||||
typedef mozilla::layers::Image Image;
|
||||
typedef mozilla::layers::PlanarYCbCrImage PlanarYCbCrImage;
|
||||
|
||||
@ -315,20 +317,15 @@ FFmpegH264Decoder<LIBAV_VER>::AllocateYUV420PVideoBuffer(
|
||||
aFrame->data[i] = buffer + offsets[i] + planesEdgeWidth[i];
|
||||
}
|
||||
|
||||
// Unused, but needs to be non-zero to keep ffmpeg happy.
|
||||
aFrame->type = GECKO_FRAME_TYPE;
|
||||
|
||||
aFrame->extended_data = aFrame->data;
|
||||
aFrame->width = aCodecContext->width;
|
||||
aFrame->height = aCodecContext->height;
|
||||
|
||||
aFrame->opaque = static_cast<void*>(image.forget().take());
|
||||
|
||||
aFrame->type = FF_BUFFER_TYPE_USER;
|
||||
aFrame->reordered_opaque = aCodecContext->reordered_opaque;
|
||||
if (aCodecContext->pkt) {
|
||||
aFrame->pkt_pts = aCodecContext->pkt->pts;
|
||||
} else {
|
||||
aFrame->pkt_pts = AV_NOPTS_VALUE;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user