|
|
@@ -56,22 +56,23 @@ static int demux_init(player_stat_t *is)
|
|
|
for (int i = 0; i < (int)p_fmt_ctx->nb_streams; i++){
|
|
|
if ((p_fmt_ctx->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) && (a_idx == -1)){
|
|
|
a_idx = i;
|
|
|
- is->rvc_hostapi->Debug(MEDIA_LOG_DEBUG, "%s Find a audio stream, index %d.", is->strPlayLists[index], a_idx);
|
|
|
+ is->rvc_hostapi->Debug(MEDIA_LOG_DEBUG, "%s Find a audio stream, index %d, eMType is %d.", is->strPlayLists[index], a_idx, is->eMType);
|
|
|
}
|
|
|
if ((p_fmt_ctx->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) && (v_idx == -1)){
|
|
|
v_idx = i;
|
|
|
- is->rvc_hostapi->Debug(MEDIA_LOG_DEBUG, "%s Find a video stream, index %d.", is->strPlayLists[index], v_idx);
|
|
|
+ is->rvc_hostapi->Debug(MEDIA_LOG_DEBUG, "%s Find a video stream, index %d, eMType is %d.", is->strPlayLists[index], v_idx, is->eMType);
|
|
|
}
|
|
|
if (a_idx != -1 && v_idx != -1){
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (a_idx == -1 && v_idx == -1){
|
|
|
+ if ((a_idx == -1 && v_idx == -1) || (eVideo_Type == is->eMType && v_idx == -1)){
|
|
|
is->rvc_hostapi->Debug(MEDIA_LOG_DEBUG, "%s can not find any audio/video stream.", is->strPlayLists[index]);
|
|
|
ret = -1;
|
|
|
if (NULL != p_fmt_ctx){
|
|
|
avformat_close_input(&p_fmt_ctx);
|
|
|
+ is->p_fmt_ctx[index] = NULL;
|
|
|
}
|
|
|
break;
|
|
|
}
|