Segmentation fault, when setting ffenc_mpeg2video

pavel justason at mail.ru
Mon Oct 21 10:26:49 CEST 2013


Also,

Quite strange, that I cannot configure another ffenc_mpeg2video object at
runtime:
Here, I just replace modifying of the encoder object from the chain, by
creating another encoder object, and configuring it.
The execution crashes at first call to g_object_set

#if 0
    encoder = gst_bin_get_by_name (GST_BIN (data->pipeline), "encoder_hq");
    if (encoder == NULL)
    {
        printf("%s-%d: Object \"encoder_hq\" could not be accessed.\n",
__func__, __LINE__);
        return -1;
    }
    printf("%s-%d: Object \"encoder_hq\" instantiated.\n", __func__,
__LINE__);
    g_object_set (encoder, "quantizer", 1, "gop-size", 15, (char *)NULL);
    printf("%s-%d: Object \"encoder_lq\" Configured\n", __func__, __LINE__);
#else

    encoder = gst_element_factory_make("ffenc_mpeg2video", "encoder_lq");
    if (!encoder)
    {
        g_printerr ("%s-%d: Object \"encoder_lq\" could not be created.\n",
__func__, __LINE__);
        return -1;
    }
    printf("%s-%d: Object \"encoder_lq\" Created\n", __func__, __LINE__);
    g_object_set (G_OBJECT(encoder), "quantizer", 1, (char *)NULL);
    g_object_set (G_OBJECT(encoder), "gop-size", 15, (char *)NULL);
    printf("%s-%d: Object \"encoder_lq\" Configured\n", __func__, __LINE__);

    gst_element_set_state(encoder, GST_STATE_READY);
    gst_bin_add(GST_BIN(data->pipeline), encoder);
#endif




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Segmentation-fault-when-setting-ffenc-mpeg2video-tp4662757p4662758.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list