From: Zhao Zhili <quinkblack@foxmail.com> To: ffmpeg-devel@ffmpeg.org Cc: Zhao Zhili <zhilizhao@tencent.com> Subject: [FFmpeg-devel] [PATCH] avfilter/src_movie: Remove align dimension to fix crash Date: Fri, 10 May 2024 16:56:16 +0800 Message-ID: <tencent_964E02704D2D199A9040F59A7B9F86ABC008@qq.com> (raw) From: Zhao Zhili <zhilizhao@tencent.com> The alignment is handled by ff_default_get_video_buffer2. We shouldn't use the aligned width/height as FFFramePool width/height. It cause recreate FFFramePool inside ff_default_get_video_buffer2. The recreate of FFFramePool together with multi-threads decoding leading to data race and crash, for example, ./ffplay -f lavfi -i movie=foo.mp4,drawtext=text=bar --- libavfilter/src_movie.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavfilter/src_movie.c b/libavfilter/src_movie.c index e2cdcf17db..5099012100 100644 --- a/libavfilter/src_movie.c +++ b/libavfilter/src_movie.c @@ -187,7 +187,6 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags) switch (avctx->codec_type) { case AVMEDIA_TYPE_VIDEO: - avcodec_align_dimensions2(avctx, &w, &h, linesize_align); new = ff_default_get_video_buffer(outlink, w, h); break; case AVMEDIA_TYPE_AUDIO: -- 2.42.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next reply other threads:[~2024-05-10 8:56 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-05-10 8:56 Zhao Zhili [this message] 2024-05-10 21:26 ` Paul B Mahol 2024-05-11 3:28 ` James Almer 2024-05-11 7:00 ` Paul B Mahol 2024-05-11 13:24 ` Andreas Rheinhardt 2024-05-11 13:48 ` Paul B Mahol 2024-05-23 7:48 ` Anton Khirnov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=tencent_964E02704D2D199A9040F59A7B9F86ABC008@qq.com \ --to=quinkblack@foxmail.com \ --cc=ffmpeg-devel@ffmpeg.org \ --cc=zhilizhao@tencent.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git