]> git.sesse.net Git - casparcg/blobdiff - modules/ffmpeg/producer/util/util.cpp
Implemented support for multiple audio streams in input and audio_decoder.
[casparcg] / modules / ffmpeg / producer / util / util.cpp
index ce1994b8854f9536729dc7feaf7a3913b3b5594f..652a9a7ccc9b4107154d9e436d4ac0d4e5644080 100644 (file)
@@ -494,7 +494,7 @@ spl::shared_ptr<AVFrame> create_frame()
 spl::shared_ptr<AVCodecContext> open_codec(AVFormatContext& context, enum AVMediaType type, int& index, bool single_threaded)
 {      
        AVCodec* decoder;
-       index = THROW_ON_ERROR2(av_find_best_stream(&context, type, -1, -1, &decoder, 0), "");
+       index = THROW_ON_ERROR2(av_find_best_stream(&context, type, index, -1, &decoder, 0), "");
        //if(strcmp(decoder->name, "prores") == 0 && decoder->next && strcmp(decoder->next->name, "prores_lgpl") == 0)
        //      decoder = decoder->next;