diff --git a/ChangeLog b/ChangeLog index 281f2fb0053..9831641bd07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-12-11 Wim Taymans + + Patch by: Mark Nauwelaerts + + * gst/avi/gstavimux.c: (gst_avi_mux_start_file): + Fix regression in stream numbering. Fixes #502655. + 2007-12-11 Wim Taymans Patch by: Wai-Ming Ho diff --git a/gst/avi/gstavimux.c b/gst/avi/gstavimux.c index 09129108183..de692a21744 100644 --- a/gst/avi/gstavimux.c +++ b/gst/avi/gstavimux.c @@ -1398,8 +1398,14 @@ gst_avi_mux_start_file (GstAviMux * avimux) node = node->next; if (!avipad->is_video) { + /* audio stream numbers must start at 1 iff there is a video stream 0; + * request_pad inserts video pad at head of list, so this test suffices */ + if (avimux->video_pads) + avimux->audio_pads++; avipad->tag = g_strdup_printf ("%02uwb", avimux->audio_pads); - avipad->idx_tag = g_strdup_printf ("ix%02u", avimux->audio_pads++); + avipad->idx_tag = g_strdup_printf ("ix%02u", avimux->audio_pads); + if (!avimux->video_pads) + avimux->audio_pads++; } else { avipad->tag = g_strdup_printf ("%02udb", avimux->video_pads); avipad->idx_tag = g_strdup_printf ("ix%02u", avimux->video_pads++);