break the loop when has found video index

break the loop when has found video index
pull/166/head
xufulong 4 years ago
parent 22d2b21f32
commit d7a97fa5f2
  1. 4
      app/src/main/cpp/video_filter.c

@ -165,9 +165,9 @@ int open_input(JNIEnv *env, const char *file_name, jobject surface) {
int i;
for (i = 0; i < pFormatCtx->nb_streams; i++) {
if (pFormatCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO
&& video_stream_index < 0) {
if (pFormatCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
video_stream_index = i;
break;
}
}
if (video_stream_index == -1) {

Loading…
Cancel
Save