comparison libmpdemux/demux_lavf.c @ 32493:59b6fef90241

Fix program switching with -demuxer lavf.
author reimar
date Sat, 06 Nov 2010 14:57:44 +0000
parents 5fc287bf541a
children e645d2d9e0db
comparison
equal deleted inserted replaced
32492:5fc287bf541a 32493:59b6fef90241
798 if(prog->sid == -2 && priv->avfc->streams[program->stream_index[i]]->codec->codec_id == CODEC_ID_TEXT) 798 if(prog->sid == -2 && priv->avfc->streams[program->stream_index[i]]->codec->codec_id == CODEC_ID_TEXT)
799 prog->sid = program->stream_index[i]; 799 prog->sid = program->stream_index[i];
800 break; 800 break;
801 } 801 }
802 } 802 }
803 if (prog->aid >= 0 && prog->aid < MAX_A_STREAMS &&
804 demuxer->a_streams[prog->aid]) {
805 sh_audio_t *sh = demuxer->a_streams[prog->aid];
806 prog->aid = sh->aid;
807 } else
808 prog->aid = -2;
809 if (prog->vid >= 0 && prog->vid < MAX_V_STREAMS &&
810 demuxer->v_streams[prog->vid]) {
811 sh_video_t *sh = demuxer->v_streams[prog->vid];
812 prog->vid = sh->vid;
813 } else
814 prog->vid = -2;
803 if(prog->progid == -1 && prog->vid == -2 && prog->aid == -2) 815 if(prog->progid == -1 && prog->vid == -2 && prog->aid == -2)
804 { 816 {
805 p = (p + 1) % priv->avfc->nb_programs; 817 p = (p + 1) % priv->avfc->nb_programs;
806 if (p == start) 818 if (p == start)
807 return DEMUXER_CTRL_DONTKNOW; 819 return DEMUXER_CTRL_DONTKNOW;