我正在使用 gst 库播放多个音频文件,但我遇到了问题:
错误:内部数据流错误
这是我的代码(没有其他解复用器和接收器初始化):
GstElement *elm1, *elm2;
elm1 = gst_element_factory_make ("filesrc", "file1.ogg");
elm2 = gst_element_factory_make ("filesrc", "file2.ogg");
g_object_set (G_OBJECT (elm1), "location", "file1.ogg", NULL);
g_object_set (G_OBJECT (elm2), "location", "file2.ogg", NULL);
GstBus *bus;
bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
bus_watch_id = gst_bus_add_watch (bus, bus_call, loop);
gst_object_unref (bus);
gst_bin_add_many (GST_BIN (pipeline), elm1, elm2, demuxer, sink, NULL);
gst_element_link_many (elm1, elm2, demuxer);
g_signal_connect (demuxer, "pad-added", G_CALLBACK (on_pad_added), sink);
gst_element_set_state (pipeline, GST_STATE_PLAYING);
我做错了什么吗?