diff options
author | Anton Khirnov <anton@khirnov.net> | 2024-09-25 14:43:54 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2024-09-28 17:04:33 +0200 |
commit | f6f0e05815a12fdae25b4ce4a345ee27de366574 (patch) | |
tree | 5d0419e6e374975ef8377ab5881fe19e975eadc0 /doc/examples/transcode.c | |
parent | 6b402cdbf46e4398b3285277f3ff7c3654d57ce6 (diff) | |
download | ffmpeg-f6f0e05815a12fdae25b4ce4a345ee27de366574.tar.gz |
doc/examples/transcode: handle audio encoder frame size restrictions
Diffstat (limited to 'doc/examples/transcode.c')
-rw-r--r-- | doc/examples/transcode.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/examples/transcode.c b/doc/examples/transcode.c index 54fb315236..1dc1b50502 100644 --- a/doc/examples/transcode.c +++ b/doc/examples/transcode.c @@ -374,6 +374,9 @@ static int init_filter(FilteringContext* fctx, AVCodecContext *dec_ctx, goto end; } + if (enc_ctx->frame_size > 0) + av_buffersink_set_frame_size(buffersink_ctx, enc_ctx->frame_size); + ret = avfilter_init_dict(buffersink_ctx, NULL); if (ret < 0) { av_log(NULL, AV_LOG_ERROR, "Cannot initialize audio buffer sink\n"); |