mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
gst/ffmpegcolorspace/gstffmpegcolorspace.c: Enable buffer alloc passthrough if the source and dest formats are the same.
Original commit message from CVS: * gst/ffmpegcolorspace/gstffmpegcolorspace.c: (gst_ffmpegcsp_getcaps), (gst_ffmpegcsp_configure_context), (gst_ffmpegcsp_setcaps), (gst_ffmpegcsp_bufferalloc), (gst_ffmpegcsp_chain): Enable buffer alloc passthrough if the source and dest formats are the same.
This commit is contained in:
parent
04fa67937d
commit
8d8f17a4ff
2 changed files with 16 additions and 1 deletions
|
@ -1,3 +1,12 @@
|
|||
2005-05-18 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/ffmpegcolorspace/gstffmpegcolorspace.c:
|
||||
(gst_ffmpegcsp_getcaps), (gst_ffmpegcsp_configure_context),
|
||||
(gst_ffmpegcsp_setcaps), (gst_ffmpegcsp_bufferalloc),
|
||||
(gst_ffmpegcsp_chain):
|
||||
Enable buffer alloc passthrough if the source and dest
|
||||
formats are the same.
|
||||
|
||||
2005-05-17 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_internal_chain),
|
||||
|
|
|
@ -394,7 +394,12 @@ gst_ffmpegcsp_bufferalloc (GstPad * pad, guint64 offset, guint size,
|
|||
|
||||
space = GST_FFMPEGCSP (GST_PAD_PARENT (pad));
|
||||
|
||||
buf = gst_pad_alloc_buffer (space->srcpad, offset, size, caps);
|
||||
if ((space->from_pixfmt == space->to_pixfmt) &&
|
||||
space->from_pixfmt != PIX_FMT_NB) {
|
||||
buf = gst_pad_alloc_buffer (space->srcpad, offset, size, caps);
|
||||
} else {
|
||||
buf = NULL;
|
||||
}
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
@ -409,6 +414,7 @@ gst_ffmpegcsp_chain (GstPad * pad, GstBuffer * buffer)
|
|||
|
||||
GST_STREAM_LOCK (pad);
|
||||
|
||||
GST_DEBUG ("from %d -> to %d", space->from_pixfmt, space->to_pixfmt);
|
||||
if (space->from_pixfmt == PIX_FMT_NB || space->to_pixfmt == PIX_FMT_NB)
|
||||
goto unkown_format;
|
||||
|
||||
|
|
Loading…
Reference in a new issue