Commit eeeb8494 authored by David Schleef's avatar David Schleef

Merge HEAD from CAPS-ROOT to CAPS-MERGE-3

Original commit message from CVS:
Merge HEAD from CAPS-ROOT to CAPS-MERGE-3
parent 05bbc256
......@@ -69,7 +69,6 @@ GST_PLUGIN_DEFINE (
plugin_init,
FFMPEG_VERSION,
"LGPL",
"(c) 2003 The FFMPEG team",
"FFMpeg",
"http://ffmpeg.sourceforge.net/"
)
......@@ -446,7 +446,7 @@ gst_ffmpeg_pixfmt_to_caps (enum PixelFormat pix_fmt,
/* .. */
break;
case PIX_FMT_RGBA32:
bpp = depth = 32;
bpp = 32; depth = 24;
endianness = G_BIG_ENDIAN;
#if (G_BYTE_ORDER == G_BIG_ENDIAN)
r_mask = 0x00ff0000; g_mask = 0x0000ff00; b_mask = 0x000000ff;
......@@ -756,9 +756,9 @@ gst_ffmpeg_caps_to_pixfmt (const GstCaps2 *caps,
switch (bpp) {
case 32:
#if (G_BYTE_ORDER == G_BIG_ENDIAN)
if (rmask == 0xff0000)
if (rmask == 0x00ff0000)
#else
if (rmask == 0x0000ff)
if (rmask == 0x0000ff00)
#endif
context->pix_fmt = PIX_FMT_RGBA32;
break;
......
......@@ -175,6 +175,7 @@ gst_ffmpegcsp_connect (GstPad *pad, const GstCaps2 *caps)
other_format = &space->from_pixfmt;
} else {
g_assert_not_reached ();
return GST_PAD_LINK_REFUSED;
}
ctx = avcodec_alloc_context ();
ctx->width = 0;
......
......@@ -340,9 +340,11 @@ gst_ffmpegdec_chain (GstPad *pad,
switch (oclass->in_plugin->type) {
case CODEC_TYPE_VIDEO:
/* workaround:
libavcodec/svq1.c:svq1_decode_frame writes to the given buffer */
if (oclass->in_plugin->id == CODEC_ID_SVQ1) {
/* workarounds, functions write to buffers:
libavcodec/svq1.c:svq1_decode_frame writes to the given buffer.
libavcodec/svq3.c:svq3_decode_slice_header too */
if (oclass->in_plugin->id == CODEC_ID_SVQ1 ||
oclass->in_plugin->id == CODEC_ID_SVQ3) {
inbuf = gst_buffer_copy_on_write(inbuf);
data = GST_BUFFER_DATA (inbuf);
size = GST_BUFFER_SIZE (inbuf);
......@@ -476,7 +478,6 @@ gst_ffmpegdec_register (GstPlugin *plugin)
/* no quasi-codecs, please */
if (in_plugin->id == CODEC_ID_RAWVIDEO ||
in_plugin->id == CODEC_ID_SVQ3 || /* segfaults */
(in_plugin->id >= CODEC_ID_PCM_S16LE &&
in_plugin->id <= CODEC_ID_PCM_ALAW)) {
goto next;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment