fix for caps api changes

This commit is contained in:
Wim Taymans 2012-03-11 19:07:31 +01:00
parent ecbbbe7fd2
commit bd13c104c2
2 changed files with 5 additions and 4 deletions

View file

@ -315,7 +315,7 @@ gst_ffmpegenc_finalize (GObject * object)
static GstCaps *
gst_ffmpegenc_get_possible_sizes (GstFFMpegEnc * ffmpegenc, GstPad * pad,
const GstCaps * caps)
GstCaps * caps)
{
GstCaps *othercaps = NULL;
GstCaps *tmpcaps = NULL;
@ -357,7 +357,8 @@ gst_ffmpegenc_get_possible_sizes (GstFFMpegEnc * ffmpegenc, GstPad * pad,
gst_structure_set_value (tmps, "height", height);
if (framerate)
gst_structure_set_value (tmps, "framerate", framerate);
gst_caps_merge_structure (tmpcaps, tmps);
tmpcaps = gst_caps_merge_structure (tmpcaps, tmps);
}
gst_caps_unref (intersect);

View file

@ -311,14 +311,14 @@ gst_ffmpegscale_transform_caps (GstBaseTransform * trans,
"width", GST_TYPE_INT_RANGE, 1, G_MAXINT,
"height", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
gst_caps_merge_structure (ret, gst_structure_copy (structure));
ret = gst_caps_merge_structure (ret, gst_structure_copy (structure));
/* if pixel aspect ratio, make a range of it */
if ((par = gst_structure_get_value (structure, "pixel-aspect-ratio"))) {
gst_structure_set (structure,
"pixel-aspect-ratio", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
gst_caps_merge_structure (ret, structure);
ret = gst_caps_merge_structure (ret, structure);
} else {
gst_structure_free (structure);
}