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

@@ -14,7 +14,7 @@ int init_decoder(
std::filesystem::path in_fpath,
AVFormatContext **fmt_ctx,
AVCodecContext **dec_ctx,
int *vstream_idx
int *in_vstream_idx
);
#endif // DECODER_H

View File

@@ -19,7 +19,8 @@ int init_encoder(
AVCodecContext **enc_ctx,
AVCodecContext *dec_ctx,
EncoderConfig *encoder_config,
int vstream_idx,
int in_vstream_idx,
int *out_vstream_idx,
int **stream_map
);
@@ -27,9 +28,9 @@ int write_frame(
AVFrame *frame,
AVCodecContext *enc_ctx,
AVFormatContext *ofmt_ctx,
int vstream_idx
int out_vstream_idx
);
int flush_encoder(AVCodecContext *enc_ctx, AVFormatContext *ofmt_ctx);
int flush_encoder(AVCodecContext *enc_ctx, AVFormatContext *ofmt_ctx, int out_vstream_idx);
#endif // ENCODER_H