Commit 78fe819e authored by Julian Rother's avatar Julian Rother
Browse files

transcode: Fix frame_size setting

parent 3e605479
......@@ -171,6 +171,9 @@ static void setup_output_stream(char *stream, AVStream *st, AVCodecContext *enc,
parse_dict(&opts, jlookup(stream, "options"));
if ((err = avcodec_open2(enc, enc->codec, &opts)) < 0)
job_failed("Opening encoder failed: %s", av_err2str(err));
if (enc->codec_type == AVMEDIA_TYPE_AUDIO &&
!(enc->codec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE && enc->frame_size))
av_buffersink_set_frame_size(sink, enc->frame_size);
avcodec_parameters_from_context(st->codecpar, enc);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment