From 8860e5c6c9076a942f26b6c006e210075a11fd35 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 2 May 2011 11:12:10 +0200 Subject: [PATCH] ffdec: fix for ALLOCATION query API changes --- ext/ffmpeg/gstffmpegdec.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c index 954da4e..2dbd0b1 100644 --- a/ext/ffmpeg/gstffmpegdec.c +++ b/ext/ffmpeg/gstffmpegdec.c @@ -1176,7 +1176,7 @@ gst_ffmpegdec_bufferpool (GstFFMpegDec * ffmpegdec, GstCaps * caps) { GstQuery *query; GstBufferPool *pool = NULL; - guint alignment, prefix, size; + guint size, min, max, prefix, alignment; GstStructure *config; /* find a pool for the negotiated caps now */ @@ -1184,13 +1184,14 @@ gst_ffmpegdec_bufferpool (GstFFMpegDec * ffmpegdec, GstCaps * caps) if (gst_pad_peer_query (ffmpegdec->srcpad, query)) { /* we got configuration from our peer, parse them */ - gst_query_parse_allocation_params (query, &alignment, &prefix, &size, - &pool); + gst_query_parse_allocation_params (query, &size, &min, &max, &prefix, + &alignment, &pool); } else { - alignment = 16; - prefix = 0; size = gst_ffmpeg_avpicture_get_size (ffmpegdec->context->pix_fmt, ffmpegdec->context->width, ffmpegdec->context->height); + min = max = 0; + prefix = 0; + alignment = 16; } if (pool == NULL) { @@ -1199,7 +1200,7 @@ gst_ffmpegdec_bufferpool (GstFFMpegDec * ffmpegdec, GstCaps * caps) } config = gst_buffer_pool_get_config (pool); - gst_buffer_pool_config_set (config, caps, size, 0, 0, prefix, 0, + gst_buffer_pool_config_set (config, caps, size, min, max, prefix, 0, MAX (alignment, 16)); gst_buffer_pool_set_config (pool, config); -- 2.7.4