the_end:
if (p && stream_index != -1)
stream_index = p->stream_index[stream_index];
+ av_log(NULL, AV_LOG_INFO, "Switch %s stream from #%d to #%d\n",
+ av_get_media_type_string(codec_type),
+ old_index,
+ stream_index);
+
stream_component_close(is, old_index);
stream_component_open(is, stream_index);
}