diff mbox series

[FFmpeg-devel,19/24] ffmpeg: fix initial muxing queue size

Message ID 20211213152042.5900-19-anton@khirnov.net
State New
Headers show
Series [FFmpeg-devel,01/24] ffmpeg: pass the muxer context explicitly to some functions | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Anton Khirnov Dec. 13, 2021, 3:20 p.m. UTC
It stores pointers to AVPacket, not AVPackets themselves.
---
 fftools/ffmpeg_mux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andreas Rheinhardt Dec. 16, 2021, 11:08 p.m. UTC | #1
Anton Khirnov:
> It stores pointers to AVPacket, not AVPackets themselves.
> ---
>  fftools/ffmpeg_mux.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c
> index 5a12a1c899..9281e6c94c 100644
> --- a/fftools/ffmpeg_mux.c
> +++ b/fftools/ffmpeg_mux.c
> @@ -411,7 +411,7 @@ int of_muxer_init(OutputFile *of, uint64_t limit_filesize)
>  
>      for (int i = 0; i < of->ctx->nb_streams; i++) {
>          MuxStream *ms = &mux->streams[i];
> -        ms->muxing_queue = av_fifo_alloc(8 * sizeof(AVPacket));
> +        ms->muxing_queue = av_fifo_alloc(8 * sizeof(AVPacket*));
>          if (!ms->muxing_queue) {
>              ret = AVERROR(ENOMEM);
>              goto fail;
> 

LGTM.

- Andreas
diff mbox series

Patch

diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c
index 5a12a1c899..9281e6c94c 100644
--- a/fftools/ffmpeg_mux.c
+++ b/fftools/ffmpeg_mux.c
@@ -411,7 +411,7 @@  int of_muxer_init(OutputFile *of, uint64_t limit_filesize)
 
     for (int i = 0; i < of->ctx->nb_streams; i++) {
         MuxStream *ms = &mux->streams[i];
-        ms->muxing_queue = av_fifo_alloc(8 * sizeof(AVPacket));
+        ms->muxing_queue = av_fifo_alloc(8 * sizeof(AVPacket*));
         if (!ms->muxing_queue) {
             ret = AVERROR(ENOMEM);
             goto fail;