We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents cdd616c + 4a746e3 commit 055b782Copy full SHA for 055b782
1 file changed
0_hello_world.c
@@ -105,9 +105,11 @@ int main(int argc, const char *argv[])
105
106
// when the stream is a video we store its index, codec parameters and codec
107
if (pLocalCodecParameters->codec_type == AVMEDIA_TYPE_VIDEO) {
108
- video_stream_index = i;
109
- pCodec = pLocalCodec;
110
- pCodecParameters = pLocalCodecParameters;
+ if (video_stream_index == -1) {
+ video_stream_index = i;
+ pCodec = pLocalCodec;
111
+ pCodecParameters = pLocalCodecParameters;
112
+ }
113
114
logging("Video Codec: resolution %d x %d", pLocalCodecParameters->width, pLocalCodecParameters->height);
115
} else if (pLocalCodecParameters->codec_type == AVMEDIA_TYPE_AUDIO) {
0 commit comments