mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
Keep different counters for audio and video.
Original commit message from CVS: Keep different counters for audio and video.
This commit is contained in:
parent
72f78c11d8
commit
86d20fdbb1
2 changed files with 7 additions and 3 deletions
|
@ -194,17 +194,17 @@ gst_avi_decoder_new_pad (GstElement *element, GstPad *pad, GstAviDecoder *avi_de
|
|||
if (!strcmp (format, "strf_vids")) {
|
||||
targetcaps = gst_padtemplate_get_caps (GST_PADTEMPLATE_GET (src_video_templ));
|
||||
media_type = AVI_TYPE_VIDEO;
|
||||
gpadname = g_strdup_printf ("video_%02d", avi_decoder->count);
|
||||
gpadname = g_strdup_printf ("video_%02d", avi_decoder->video_count++);
|
||||
}
|
||||
else if (!strcmp (format, "strf_auds")) {
|
||||
targetcaps = gst_padtemplate_get_caps (GST_PADTEMPLATE_GET (src_audio_templ));
|
||||
media_type = AVI_TYPE_AUDIO;
|
||||
gpadname = g_strdup_printf ("audio_%02d", avi_decoder->count);
|
||||
gpadname = g_strdup_printf ("audio_%02d", avi_decoder->audio_count++);
|
||||
}
|
||||
else if (!strcmp (format, "strf_iavs")) {
|
||||
targetcaps = gst_padtemplate_get_caps (GST_PADTEMPLATE_GET (src_video_templ));
|
||||
media_type = AVI_TYPE_VIDEO;
|
||||
gpadname = g_strdup_printf ("video_%02d", avi_decoder->count);
|
||||
gpadname = g_strdup_printf ("video_%02d", avi_decoder->video_count++);
|
||||
}
|
||||
else {
|
||||
g_assert_not_reached ();
|
||||
|
@ -293,6 +293,8 @@ gst_avi_decoder_init (GstAviDecoder *avi_decoder)
|
|||
}
|
||||
|
||||
avi_decoder->count = 0;
|
||||
avi_decoder->audio_count = 0;
|
||||
avi_decoder->video_count = 0;
|
||||
}
|
||||
|
||||
static GstCaps*
|
||||
|
|
|
@ -50,6 +50,8 @@ struct _GstAviDecoder {
|
|||
|
||||
GstElement *demuxer;
|
||||
|
||||
gint audio_count;
|
||||
gint video_count;
|
||||
gint count;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue