[FFmpeg-cvslog] doc/examples/transcode: handle audio encoder frame size restrictions

Anton Khirnov git at videolan.org
Sat Sep 28 18:13:17 EEST 2024


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Wed Sep 25 14:43:54 2024 +0200| [f6f0e05815a12fdae25b4ce4a345ee27de366574] | committer: Anton Khirnov

doc/examples/transcode: handle audio encoder frame size restrictions

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f6f0e05815a12fdae25b4ce4a345ee27de366574
---

 doc/examples/transcode.c | 3 +++
 1 file changed, 3 insertions(+)

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");



More information about the ffmpeg-cvslog mailing list