diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-03-14 20:04:53 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-03-14 20:04:53 +0100 |
commit | d9e16a498c03f1df37345a672c432036ba14f1ae (patch) | |
tree | 1c959c6a5b9479baf431190f8082454ca45050fd | |
parent | d606efc14185219c121d68e753d9b7017aa00336 (diff) |
ffdec: propose some padding in the allocation query
Hopefully upstream can add some padding and then we don't have to memcpy.
-rw-r--r-- | ext/ffmpeg/gstffmpegdec.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c index 84be7c9..60b0fb5 100644 --- a/ext/ffmpeg/gstffmpegdec.c +++ b/ext/ffmpeg/gstffmpegdec.c @@ -1440,8 +1440,8 @@ gst_ffmpegdec_audio_negotiate (GstFFMpegDec * ffmpegdec, gboolean force) memcpy (ffmpegdec->format.audio.gst_layout, ffmpegdec->format.audio.ffmpeg_layout, sizeof (GstAudioChannelPosition) * ffmpegdec->format.audio.channels); - gst_audio_channel_positions_to_valid_order (ffmpegdec->format. - audio.gst_layout, ffmpegdec->format.audio.channels); + gst_audio_channel_positions_to_valid_order (ffmpegdec->format.audio. + gst_layout, ffmpegdec->format.audio.channels); GST_LOG_OBJECT (ffmpegdec, "output caps %" GST_PTR_FORMAT, caps); @@ -2720,6 +2720,14 @@ gst_ffmpegdec_sink_query (GstPad * pad, GstObject * parent, GstQuery * query) } break; } + case GST_QUERY_ALLOCATION: + /* we would like to have some padding so that we don't have to memcpy, + * since we have variable sized input, set size to 0, min/max buffers and + * a pool are not useful for us. */ + gst_query_set_allocation_params (query, 0, 0, 0, 0, + FF_INPUT_BUFFER_PADDING_SIZE, 0, NULL); + ret = TRUE; + break; default: ret = gst_pad_query_default (pad, parent, query); break; |