8000 Fix `transmuxing` typo in params by j0sh · Pull Request #409 · livepeer/lpms · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix transmuxing typo in params #409

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions ffmpeg/decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,24 +335,23 @@ int open_input(input_params *params, struct input_ctx *ctx)
char *inp = params->fname;
int ret = 0;

ctx->transmuxing = params->transmuxe;
ctx->transmuxing = params->transmuxing;

// open demuxer
ret = avformat_open_input(&ic, inp, NULL, NULL);
if (ret < 0) LPMS_ERR(open_input_err, "demuxer: Unable to open input");
ctx->ic = ic;
ret = avformat_find_stream_info(ic, NULL);
if (ret < 0) LPMS_ERR(open_input_err, "Unable to find input info");
if (params->transmuxe == 0) {
ret = open_video_decoder(params, ctx);
if (ret < 0) LPMS_ERR(open_input_err, "Unable to open video decoder")
ret = open_audio_decoder(params, ctx);
if (ret < 0) LPMS_ERR(open_input_err, "Unable to open audio decoder")
ctx->last_frame_v = av_frame_alloc();
if (!ctx->last_frame_v) LPMS_ERR(open_input_err, "Unable to alloc last_frame_v");
ctx->last_frame_a = av_frame_alloc();
if (!ctx->last_frame_a) LPMS_ERR(open_input_err, "Unable to alloc last_frame_a");
}
if (params->transmuxing) return 0;
ret = open_video_decoder(params, ctx);
if (ret < 0) LPMS_ERR(open_input_err, "Unable to open video decoder")
ret = open_audio_decoder(params, ctx);
if (ret < 0) LPMS_ERR(open_input_err, "Unable to open audio decoder")
ctx->last_frame_v = av_frame_alloc();
if (!ctx->last_frame_v) LPMS_ERR(open_input_err, "Unable to alloc last_frame_v");
ctx->last_frame_a = av_frame_alloc();
if (!ctx->last_frame_a) LPMS_ERR(open_input_err, "Unable to alloc last_frame_a");

return 0;

Expand Down
2 changes: 1 addition & 1 deletion ffmpeg/ffmpeg.go
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ func (t *Transcoder) Transcode(input *TranscodeOptionsIn, ps []TranscodeOptions)
inp := &C.input_params{fname: fname, hw_type: hw_type, device: device, xcoderParams: xcoderParams,
handle: t.handle}
if input.Transmuxing {
inp.transmuxe = 1
inp.transmuxing = 1
}
results := make([]C.output_results, len(ps))
decoded := &C.output_results{}
Expand Down
3 changes: 2 additions & 1 deletion ffmpeg/transcoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ typedef struct {
// Optional video decoder + opts
component_opts video;

int transmuxe;
// concatenates multiple inputs into the same output
int transmuxing;
} input_params;

#define MAX_CLASSIFY_SIZE 10
Expand Down
Loading
0