VideoTrack videoTrack = null;
AudioTrack audioTrack = null;
for (int i = 0; i < formatCtx.nb_streams; i++)
{ final AVStream stream = new AVStream(formatCtx.getStreams()[i]);
final AVCodecContext codecCtx = new AVCodecContext(stream.codec);
if (codecCtx.codec_id == 0)
{ logger.info("Codec id is zero (no codec) - skipping stream " + i);
continue;
}
if (codecCtx.codec_type == AVCodecLibrary.CODEC_TYPE_VIDEO && videoTrack == null)