fix(encoder): fixed incorrect stream mapping for multi-stream files

Signed-off-by: k4yt3x <i@k4yt3x.com>
This commit is contained in:
k4yt3x
2024-11-06 00:00:00 +00:00
parent 3b7921a774
commit 33b7c53e16
6 changed files with 82 additions and 58 deletions

View File

@@ -25,7 +25,7 @@ int init_decoder(
std::filesystem::path in_fpath,
AVFormatContext **fmt_ctx,
AVCodecContext **dec_ctx,
int *vstream_idx
int *in_vstream_idx
) {
AVFormatContext *ifmt_ctx = NULL;
AVCodecContext *codec_ctx = NULL;
@@ -110,7 +110,7 @@ int init_decoder(
*fmt_ctx = ifmt_ctx;
*dec_ctx = codec_ctx;
*vstream_idx = stream_index;
*in_vstream_idx = stream_index;
return 0;
}