mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 23:06:49 +00:00
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.
This commit is contained in:
parent
1b5a9e3fca
commit
fd380cb847
3 changed files with 24 additions and 7 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
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>
|
2006-03-01 Michal Benes <michal dot benes at xeris dot cz>
|
||||||
|
|
||||||
Reviewed by : Edward Hervey <edward@fluendo.com>
|
Reviewed by : Edward Hervey <edward@fluendo.com>
|
||||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
||||||
Subproject commit c09cd18d328f740ac532377fa5605b0f712cc6fd
|
Subproject commit 9200457d08a57f0d7eaeb56915804fa8faf14418
|
|
@ -897,12 +897,21 @@ gst_ffmpegdec_frame (GstFFMpegDec * ffmpegdec,
|
||||||
if (!gst_ffmpegdec_negotiate (ffmpegdec))
|
if (!gst_ffmpegdec_negotiate (ffmpegdec))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if ((*ret =
|
if (!ffmpegdec->context->palctrl) {
|
||||||
gst_pad_alloc_buffer_and_set_caps (ffmpegdec->srcpad,
|
if ((*ret =
|
||||||
GST_BUFFER_OFFSET_NONE, fsize,
|
gst_pad_alloc_buffer_and_set_caps (ffmpegdec->srcpad,
|
||||||
GST_PAD_CAPS (ffmpegdec->srcpad),
|
GST_BUFFER_OFFSET_NONE, fsize,
|
||||||
&outbuf)) != GST_FLOW_OK)
|
GST_PAD_CAPS (ffmpegdec->srcpad),
|
||||||
return -1;
|
&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.
|
/* original ffmpeg code does not handle odd sizes correctly.
|
||||||
* This patched up version does */
|
* This patched up version does */
|
||||||
|
|
Loading…
Reference in a new issue