summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2003-12-18 10:01:10 +0000
committerDavid Schleef <ds@schleef.org>2003-12-18 10:01:10 +0000
commit5ce27f2ef5e1545bafc63ce0112387a621d06b42 (patch)
treecfde0cbeb2cfca40b8e30f09ee2a7f9af1740b77
parenteeeb8494bff220a44d0730cd992ef0eb1ffb127c (diff)
Fix a few typos in the caps conversion
Original commit message from CVS: Fix a few typos in the caps conversion
-rw-r--r--ext/ffmpeg/gstffmpegcodecmap.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/ext/ffmpeg/gstffmpegcodecmap.c b/ext/ffmpeg/gstffmpegcodecmap.c
index 3c246b4..9969194 100644
--- a/ext/ffmpeg/gstffmpegcodecmap.c
+++ b/ext/ffmpeg/gstffmpegcodecmap.c
@@ -41,14 +41,14 @@
gst_caps2_new_simple (mimetype, \
"width", G_TYPE_INT, context->width, \
"height", G_TYPE_INT, context->height, \
- "framerate", G_TYPE_FLOAT, 1. * context->frame_rate / \
+ "framerate", G_TYPE_DOUBLE, 1. * context->frame_rate / \
context->frame_rate_base, \
##props, NULL) \
: \
gst_caps2_new_simple (mimetype, \
- "width", GST_TYPE_INT_RANGE, 16, 4096, \
+ "width", GST_TYPE_INT_RANGE, 16, 4096, \
"height", GST_TYPE_INT_RANGE, 16, 4096, \
- "framerate", GST_TYPE_DOUBLE_RANGE, 0, G_MAXFLOAT, \
+ "framerate", GST_TYPE_DOUBLE_RANGE, 0., G_MAXDOUBLE, \
##props, NULL)
/* same for audio - now with channels/sample rate
@@ -559,7 +559,7 @@ GstCaps2 *
gst_ffmpeg_codectype_to_caps (enum CodecType codec_type,
AVCodecContext *context)
{
- GstCaps2 *caps = NULL;
+ GstCaps2 *caps;
switch (codec_type) {
case CODEC_TYPE_VIDEO:
@@ -569,6 +569,7 @@ gst_ffmpeg_codectype_to_caps (enum CodecType codec_type,
GstCaps2 *temp;
enum PixelFormat i;
+ caps = gst_caps2_new_empty ();
for (i = 0; i < PIX_FMT_NB; i++) {
temp = gst_ffmpeg_pixfmt_to_caps (i, NULL);
if (temp != NULL) {
@@ -585,6 +586,7 @@ gst_ffmpeg_codectype_to_caps (enum CodecType codec_type,
GstCaps2 *temp;
enum SampleFormat i;
+ caps = gst_caps2_new_empty ();
for (i = 0; i <= SAMPLE_FMT_S16; i++) {
temp = gst_ffmpeg_smpfmt_to_caps (i, NULL);
if (temp != NULL) {
@@ -596,6 +598,7 @@ gst_ffmpeg_codectype_to_caps (enum CodecType codec_type,
default:
/* .. */
+ caps = NULL;
break;
}