mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-08 18:39:54 +00:00
-fix segfault on PAUSED => READY when metadata wasn't set
Original commit message from CVS: -fix segfault on PAUSED => READY when metadata wasn't set - fix caps mimetype that always caused a failure on caps nego
This commit is contained in:
parent
29e9ebcfda
commit
f2fb714954
1 changed files with 8 additions and 5 deletions
|
@ -174,10 +174,10 @@ flac_caps_factory (void)
|
||||||
gst_caps_new (
|
gst_caps_new (
|
||||||
"flac_flac",
|
"flac_flac",
|
||||||
"application/x-flac",
|
"application/x-flac",
|
||||||
/*gst_props_new (
|
/* gst_props_new (
|
||||||
"rate", GST_PROPS_INT_RANGE (11025, 48000),
|
"rate", GST_PROPS_INT_RANGE (11025, 48000),
|
||||||
"channels", GST_PROPS_INT_RANGE (1, 2),
|
"channels", GST_PROPS_INT_RANGE (1, 2),
|
||||||
NULL)*/ NULL);
|
NULL) */NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstCaps*
|
static GstCaps*
|
||||||
|
@ -386,7 +386,7 @@ gst_flacenc_sinkconnect (GstPad *pad, GstCaps *caps)
|
||||||
gst_caps_get_int (caps, "rate", &flacenc->sample_rate);
|
gst_caps_get_int (caps, "rate", &flacenc->sample_rate);
|
||||||
|
|
||||||
caps = GST_CAPS_NEW ("flacenc_srccaps",
|
caps = GST_CAPS_NEW ("flacenc_srccaps",
|
||||||
"audio/x-flac",
|
"application/x-flac",
|
||||||
"channels", GST_PROPS_INT (flacenc->channels),
|
"channels", GST_PROPS_INT (flacenc->channels),
|
||||||
"rate", GST_PROPS_INT (flacenc->sample_rate));
|
"rate", GST_PROPS_INT (flacenc->sample_rate));
|
||||||
ret = gst_pad_try_set_caps (flacenc->srcpad, caps);
|
ret = gst_pad_try_set_caps (flacenc->srcpad, caps);
|
||||||
|
@ -776,8 +776,11 @@ gst_flacenc_change_state (GstElement *element)
|
||||||
flacenc->first_buf = NULL;
|
flacenc->first_buf = NULL;
|
||||||
g_free (flacenc->data);
|
g_free (flacenc->data);
|
||||||
flacenc->data = NULL;
|
flacenc->data = NULL;
|
||||||
FLAC__metadata_object_delete (flacenc->meta[0]);
|
if (flacenc->meta) {
|
||||||
g_free (flacenc->meta);
|
FLAC__metadata_object_delete (flacenc->meta[0]);
|
||||||
|
g_free (flacenc->meta);
|
||||||
|
flacenc->meta = NULL;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case GST_STATE_READY_TO_NULL:
|
case GST_STATE_READY_TO_NULL:
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue