Commit fd380cb8 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠

ext/ffmpeg/gstffmpegdec.c: Don't use gst_pad_alloc_buffer() for frames with...

ext/ffmpeg/gstffmpegdec.c: Don't use gst_pad_alloc_buffer() for frames with palette, as we'll artificially shorten th...

Original commit message from CVS:
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_frame):
Don't use gst_pad_alloc_buffer() for frames with palette,
as we'll artificially shorten the size of buffers in that
case and GstBaseTransform will complain about unit size
issues if we use _alloc_buffer() with the full size.
parent 1b5a9e3f
2006-03-14 Tim-Philipp Müller <tim at centricular dot net>
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_frame):
Don't use gst_pad_alloc_buffer() for frames with palette,
as we'll artificially shorten the size of buffers in that
case and GstBaseTransform will complain about unit size
issues if we use _alloc_buffer() with the full size.
2006-03-01 Michal Benes <michal dot benes at xeris dot cz>
Reviewed by : Edward Hervey <edward@fluendo.com>
......
common @ 9200457d
Subproject commit c09cd18d328f740ac532377fa5605b0f712cc6fd
Subproject commit 9200457d08a57f0d7eaeb56915804fa8faf14418
......@@ -897,12 +897,21 @@ gst_ffmpegdec_frame (GstFFMpegDec * ffmpegdec,
if (!gst_ffmpegdec_negotiate (ffmpegdec))
return -1;
if ((*ret =
gst_pad_alloc_buffer_and_set_caps (ffmpegdec->srcpad,
GST_BUFFER_OFFSET_NONE, fsize,
GST_PAD_CAPS (ffmpegdec->srcpad),
&outbuf)) != GST_FLOW_OK)
return -1;
if (!ffmpegdec->context->palctrl) {
if ((*ret =
gst_pad_alloc_buffer_and_set_caps (ffmpegdec->srcpad,
GST_BUFFER_OFFSET_NONE, fsize,
GST_PAD_CAPS (ffmpegdec->srcpad),
&outbuf)) != GST_FLOW_OK)
return -1;
} else {
/* for paletted data we can't use pad_alloc_buffer(), because
* fsize contains the size of the palette, so the overall size
* is bigger than ffmpegcolorspace's unit size, which will
* prompt GstBaseTransform to complain endlessly ... */
outbuf = gst_buffer_new_and_alloc (fsize);
gst_buffer_set_caps (outbuf, GST_PAD_CAPS (ffmpegdec->srcpad));
}
/* original ffmpeg code does not handle odd sizes correctly.
* This patched up version does */
......
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