From: Wim Taymans Date: Sun, 23 Dec 2001 23:26:50 +0000 (+0000) Subject: Keep different counters for audio and video. X-Git-Tag: BRANCH-EVENTS2-ROOT~270 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=86d20fdbb1ea1015dc4e11e7fb14b396618fce58;p=platform%2Fupstream%2Fgst-plugins-good.git Keep different counters for audio and video. Original commit message from CVS: Keep different counters for audio and video. --- diff --git a/gst/avi/gstavidecoder.c b/gst/avi/gstavidecoder.c index e9210a7..8502413 100644 --- a/gst/avi/gstavidecoder.c +++ b/gst/avi/gstavidecoder.c @@ -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* diff --git a/gst/avi/gstavidecoder.h b/gst/avi/gstavidecoder.h index bd18c5c..214000c 100644 --- a/gst/avi/gstavidecoder.h +++ b/gst/avi/gstavidecoder.h @@ -50,6 +50,8 @@ struct _GstAviDecoder { GstElement *demuxer; + gint audio_count; + gint video_count; gint count; };