[Bug 683920] New: rmdemux can not set caps on its own pad
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Thu Sep 13 00:04:54 PDT 2012
https://bugzilla.gnome.org/show_bug.cgi?id=683920
GStreamer | gst-plugins-ugly | 0.11.x
Summary: rmdemux can not set caps on its own pad
Classification: Platform
Product: GStreamer
Version: 0.11.x
OS/Version: All
Status: UNCONFIRMED
Severity: major
Priority: Normal
Component: gst-plugins-ugly
AssignedTo: gstreamer-bugs at lists.freedesktop.org
ReportedBy: zhangyanping210 at yahoo.com.cn
QAContact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
In function gst_rmdemux_add_stream, it will create video and audio pad, and
will set caps of them.
static void
gst_rmdemux_add_stream (GstRMDemux * rmdemux, GstRMDemuxStream * stream)
{
if (stream->subtype == GST_RMDEMUX_STREAM_VIDEO) {
char *name = g_strdup_printf ("video_%u", rmdemux->n_video_streams);
stream->pad =
gst_pad_new_from_static_template (&gst_rmdemux_videosrc_template,
name);
......
} else if (stream->subtype == GST_RMDEMUX_STREAM_AUDIO) {
char *name = g_strdup_printf ("audio_%u", rmdemux->n_audio_streams);
stream->pad =
gst_pad_new_from_static_template (&gst_rmdemux_audiosrc_template,
name);
}
......
gst_pad_use_fixed_caps (stream->pad);
gst_pad_set_caps (stream->pad, stream_caps);
gst_pad_set_event_function (stream->pad,
.....
}
gst_pad_new_from_static_template --> gst_pad_init will set pad flag to flushing
by call GST_PAD_SET_FLUSHING (pad);
And gst_pad_set_caps will failed if the pad flag is flushing.
So we should add GST_PAD_UNSET_FLUSHING(stream->pad) after the pad is created.
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list