[FFmpeg-devel] [PATCH 2/7] avcodec/vc1dec: Postpone allocating sprite frame to avoid segfault

2020-12-25 Thread Andreas Rheinhardt
Up until now, the VC-1 decoders allocated an AVFrame for usage with sprites during vc1_decode_init(); yet said AVFrame can be freed if (re)initializing the context (which happens ordinarily during decoding) fails. The AVFrame does not get allocated again lateron in this case, leading to segfaults.

[FFmpeg-devel] [PATCH 3/7] avcodec/vc1: Don't pretend ff_vc1_init_common() can fail

2020-12-25 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mss2.c | 3 +-- libavcodec/vc1.c| 4 +--- libavcodec/vc1.h| 2 +- libavcodec/vc1_parser.c | 3 ++- libavcodec/vc1dec.c | 3 +-- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/libavcodec/mss2.c b/libavcodec/

[FFmpeg-devel] [PATCH 4/7] avcodec/h261dec: Remove parse_context cruft

2020-12-25 Thread Andreas Rheinhardt
The H.261 decoder doesn't use the ParseContext of its MpegEncContext since e7316976650b429345da619c3acff38004aaf6b8. Signed-off-by: Andreas Rheinhardt --- Does actually anybody use the AV_CODEC_FLAG_TRUNCATED (MpegEncContext contains a ParseContext because of this flag)? libavcodec/h261dec.c |

[FFmpeg-devel] [PATCH 6/7] avcodec/mpegvideo: Fix memleak upon allocation error

2020-12-25 Thread Andreas Rheinhardt
When slice-threading is used, ff_mpv_common_init() duplicates the first MpegEncContext and allocates some buffers for each MpegEncContext (the first as well as the copies). But the count of allocated MpegEncContexts is not updated until after everything has been allocated and if an error happens af

[FFmpeg-devel] [PATCH 7/7] avcodec/mpegvideo: Factor common freeing code out

2020-12-25 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.c | 30 -- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 3daccb816f..dd50c03306 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegv

[FFmpeg-devel] [PATCH 5/7] Revert "avcodec: add FF_CODEC_CAP_INIT_CLEANUP for all codecs which use ff_mpv_common_init()"

2020-12-25 Thread Andreas Rheinhardt
This mostly reverts commit 4b2863ff01b1fe93d9a518523c9098d17a9d8c6f. Said commit removed the freeing code from ff_mpv_common_init(), ff_mpv_common_frame_size_change() and ff_mpeg_framesize_alloc() and instead added the FF_CODEC_CAP_INIT_CLEANUP to several codecs that use ff_mpv_common_init(). This

[FFmpeg-devel] [PATCH 1/7] avcodec/mpeg12dec: Remove update_thread_context

2020-12-25 Thread Andreas Rheinhardt
No decoder here supports frame threading. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpeg12dec.c | 28 1 file changed, 28 deletions(-) diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index 6d0e9fc7ed..66556c7a82 100644 --- a/libavcodec/mpeg12dec.c

Re: [FFmpeg-devel] [PATCH 1/7] avcodec/mpeg12dec: Remove update_thread_context

2020-12-25 Thread Michael Niedermayer
On Fri, Dec 25, 2020 at 04:47:18PM +0100, Andreas Rheinhardt wrote: > No decoder here supports frame threading. what is missing for them to support it ? the whole mpeg* decoders used alot of shared code, mpeg4 supports frame threads. And i see little threading related code in mpeg4 ... Thanks [

Re: [FFmpeg-devel] [PATCH] avfilter/vf_framerate: fix infinite loop with 1-frame input

2020-12-25 Thread Marton Balint
On Sun, 20 Dec 2020, Marton Balint wrote: Fixes infinite loop in: ffmpeg -f lavfi -i testsrc=d=0.04 -vf framerate=50 -f null none Ping, will apply soon. Regards, Marton Signed-off-by: Marton Balint --- libavfilter/vf_framerate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) d

Re: [FFmpeg-devel] [PATCH 2/6] avcodec: add h266 codec id and profiles

2020-12-25 Thread Nuo Mi
On Tue, Dec 22, 2020 at 6:37 PM Nuo Mi wrote: > > Hi James, > thanks for the review. > > On Mon, Dec 21, 2020 at 11:14 PM James Almer wrote: > >> On 12/21/2020 3:07 AM, Nuo Mi wrote: >> > --- >> > libavcodec/avcodec.h| 2 ++ >> > libavcodec/codec_desc.c | 8 >> > libavcodec/code