Commit a97dc76a authored by Sebastian Dröge's avatar Sebastian Dröge
Browse files

gst/ffmpegcolorspace/: Only set/get on the PAL8 format, ffmpegcolorspace...

gst/ffmpegcolorspace/: Only set/get on the PAL8 format, ffmpegcolorspace doesn't support it on other formats. Also ad...

Original commit message from CVS:
* gst/ffmpegcolorspace/gstffmpegcodecmap.c:
(gst_ffmpeg_pixfmt_to_caps):
* gst/ffmpegcolorspace/gstffmpegcolorspace.c:
(gst_ffmpegcsp_get_unit_size):
Only set/get on the PAL8 format, ffmpegcolorspace doesn't support
it on other formats. Also adjust the unit size only for that format
to not include the palette. Fixes bug #540497.
parent e0d27d23
2008-06-30 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* gst/ffmpegcolorspace/gstffmpegcodecmap.c:
(gst_ffmpeg_pixfmt_to_caps):
* gst/ffmpegcolorspace/gstffmpegcolorspace.c:
(gst_ffmpegcsp_get_unit_size):
Only set/get on the PAL8 format, ffmpegcolorspace doesn't support
it on other formats. Also adjust the unit size only for that format
to not include the palette. Fixes bug #540497.
2008-06-29 Stefan Kost <ensonic@users.sf.net>
 
* gst/adder/gstadder.c:
......@@ -390,7 +390,7 @@ gst_ffmpeg_pixfmt_to_caps (enum PixelFormat pix_fmt, AVCodecContext * context)
"bpp", G_TYPE_INT, bpp,
"depth", G_TYPE_INT, depth,
"endianness", G_TYPE_INT, endianness, NULL);
if (context) {
if (context && context->pix_fmt == PIX_FMT_PAL8) {
gst_ffmpeg_set_palette (caps, context);
}
}
......
......@@ -412,7 +412,8 @@ gst_ffmpegcsp_get_unit_size (GstBaseTransform * btrans, GstCaps * caps,
* GStreamer currently puts it into the caps as 'palette_data' field,
* so for paletted data the frame size avpicture_get_size() returns is
* 1024 bytes larger than what GStreamer expects. */
if (gst_structure_has_field (structure, "palette_data")) {
if (gst_structure_has_field (structure, "palette_data") &&
ctx->pix_fmt == PIX_FMT_PAL8) {
*size -= 4 * 256; /* = AVPALETTE_SIZE */
}
......
Supports Markdown
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