is->subpq_mutex = SDL_CreateMutex(); is->subpq_cond = SDL_CreateCond();  is->subtitle_decoder_mutex = SDL_CreateMutex();
static VideoState *stream_open(const char *filename, AVInputFormat *iformat){    VideoState *is;    is = av_mallocz(sizeof(VideoState));    if (!is)        return NULL;    pstrcpy(is->filename, sizeof(is->filename), filename);    is->iformat = iformat;    if (screen) {        is->width = screen->w;        is->height = screen->h;    }    is->ytop = 0;    is->xleft = 0;    /* start video display */    is->pictq_mutex = SDL_CreateMutex();    is->pictq_cond = SDL_CreateCond();        is->audio_decoder_mutex = SDL_CreateMutex();    is->video_decoder_mutex = SDL_CreateMutex();    /* add the refresh timer to draw the picture */    schedule_refresh(is, 40);    is->av_sync_type = av_sync_type;    is->parse_tid = SDL_CreateThread(decode_thread, is);    if (!is->parse_tid) {        av_free(is);        return NULL;    }    return is;}