case CODEC_TYPE_SUBTITLE: is->subtitle_st = NULL; is->subtitle_stream = -1; break;
static void stream_component_close(VideoState *is, int stream_index){    AVFormatContext *ic = is->ic;    AVCodecContext *enc;        enc = ic->streams[stream_index]->codec;    switch(enc->codec_type) {    case CODEC_TYPE_AUDIO:        packet_queue_abort(&is->audioq);        SDL_CloseAudio();        packet_queue_end(&is->audioq);        break;    case CODEC_TYPE_VIDEO:        packet_queue_abort(&is->videoq);        /* note: we also signal this mutex to make sure we deblock the           video thread in all cases */        SDL_LockMutex(is->pictq_mutex);        SDL_CondSignal(is->pictq_cond);        SDL_UnlockMutex(is->pictq_mutex);        SDL_WaitThread(is->video_tid, NULL);        packet_queue_end(&is->videoq);        break;    default:        break;    }    avcodec_close(enc);    switch(enc->codec_type) {    case CODEC_TYPE_AUDIO:        is->audio_st = NULL;        is->audio_stream = -1;        break;    case CODEC_TYPE_VIDEO:        is->video_st = NULL;        is->video_stream = -1;        break;    default:        break;    }}