[FFmpeg-devel] [PATCH v4] avcodec/libx264: fix extradata when config annexb=0

2024-03-12 Thread Zhao Zhili
From: Zhao Zhili --- v4: Fix missing SEI in set_avcc_extradata v3: Remove unnecessary inclusion configure| 2 +- libavcodec/libx264.c | 153 --- 2 files changed, 130 insertions(+), 25 deletions(-) diff --git a/configure b/configure index

[FFmpeg-devel] [PATCH v5] avcodec/libx264: fix extradata when config annexb=0

2024-03-13 Thread Zhao Zhili
From: Zhao Zhili --- v5: Decode chroma_format_idc directly instead of ff_h264_decode_seq_parameter_set v4: Fix missing SEI in set_avcc_extradata v3: Remove unnecessary inclusion libavcodec/libx264.c | 162 --- 1 file changed, 138 insertions(+), 24

Re: [FFmpeg-devel] [PATCH v4] avcodec/libx264: fix extradata when config annexb=0

2024-03-13 Thread Zhao Zhili
> On Mar 12, 2024, at 23:00, Andreas Rheinhardt > wrote: > > Zhao Zhili: >> From: Zhao Zhili >> >> --- >> v4: Fix missing SEI in set_avcc_extradata >> v3: Remove unnecessary inclusion >> >> confi

[FFmpeg-devel] [PATCH] avcodec/decode: log hwaccel name

2024-03-13 Thread Zhao Zhili
From: Zhao Zhili Many users mistakenly think that hwaccel is an instance of a decoder, and cannot find the corresponding decoder name in the logs. Log hwaccel name so user know hwaccel has taken effect. --- libavcodec/decode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[FFmpeg-devel] [PATCH v6] avcodec/libx264: fix extradata when config annexb=0

2024-03-16 Thread Zhao Zhili
From: Zhao Zhili --- v6: use av_assert2 select golomb in configure conditional compile in case of CONFIG_LIBX264_ENCODER=0 v5: Decode chroma_format_idc directly instead of ff_h264_decode_seq_parameter_set v4: Fix missing SEI in set_avcc_extradata v3: Remove unnecessary inclusion

Re: [FFmpeg-devel] [PATCH v5] avcodec/libx264: fix extradata when config annexb=0

2024-03-16 Thread Zhao Zhili
> On Mar 14, 2024, at 21:14, Andreas Rheinhardt > wrote: > > Zhao Zhili: >> From: Zhao Zhili >> >> --- >> v5: Decode chroma_format_idc directly instead of >> ff_h264_decode_seq_parameter_set >> v4: Fix missing SEI in set_avcc_extradata >&

Re: [FFmpeg-devel] [PATCH v2 2/6] avformat: add Android content resolver protocol support

2024-03-16 Thread Zhao Zhili
Sorry for the long delay of review. > On Mar 5, 2024, at 03:37, Matthieu Bouron wrote: > > On Tue, Feb 27, 2024 at 03:50:38PM +0100, Matthieu Bouron wrote: >> Handles Android content-uri starting with content://. >> --- > > [...] > > Handles Android content-uri starting with content://. > ---

Re: [FFmpeg-devel] [PATCH v5 1/3] avformat/flvdec: support enhanced flv PacketTypeMetadata

2024-03-18 Thread Zhao Zhili
> On Mar 18, 2024, at 17:14, Dennis Mungai wrote: > > Steven and Zhu Pengfei, > > Thank you for the patchset. Can this be back-ported to release/6.1? Only bug fix and security fix can be back ported to stable release. This patch is for new feature. > ___

[FFmpeg-devel] [PATCH] Changelog: mention ffplay with hwaccel decoding support

2024-03-18 Thread Zhao Zhili
From: Zhao Zhili --- Changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/Changelog b/Changelog index e3ca52430c..c6e8f6bcaf 100644 --- a/Changelog +++ b/Changelog @@ -35,6 +35,7 @@ version : - AEA muxer - ffmpeg CLI loopback decoders - Support PacketTypeMetadata of PacketType in

Re: [FFmpeg-devel] [PATCH 3/3] Revert "avcodec/h264_mp4toannexb_bsf: fix missing PS before IDR frames"

2024-03-19 Thread Zhao Zhili
> On Mar 20, 2024, at 10:19, Michael Niedermayer wrote: > > This reverts commit d3aa0cd16f5e952bc346b7c74b4dcba95151a63a. > > Fixes: out of array write > Fixes: > 64407/clusterfuzz-testcase-minimized-ffmpeg_BSF_H264_MP4TOANNEXB_fuzzer-4966763443650560 > > The bsf code performs 2 iterations,

Re: [FFmpeg-devel] [PATCH 3/3] Revert "avcodec/h264_mp4toannexb_bsf: fix missing PS before IDR frames"

2024-03-20 Thread Zhao Zhili
R frames" > > On Wed, Mar 20, 2024 at 02:41:05PM +0800, Zhao Zhili wrote: > > > > > > > On Mar 20, 2024, at 10:19, Michael Niedermayer > > > wrote: > > > > > > This reverts commit d3aa0cd16f5e952bc346b7c74b4dcba95151a63a. > >

Re: [FFmpeg-devel] [PATCH v6] avcodec/libx264: fix extradata when config annexb=0

2024-03-21 Thread Zhao Zhili
Ping. Will apply this week if no more comments. > -Original Message- > From: ffmpeg-devel On Behalf Of Zhao Zhili > Sent: 2024年3月17日 11:35 > To: ffmpeg-devel@ffmpeg.org > Cc: Zhao Zhili > Subject: [FFmpeg-devel] [PATCH v6] avcodec/libx264: fix extradata when config &g

Re: [FFmpeg-devel] [PATCH v10 14/14] avcodec/libx265: add support for writing out CLL and MDCV

2024-03-22 Thread Zhao Zhili
> On Mar 19, 2024, at 05:31, Jan Ekström wrote: > > The newer of these two are the separate integers for content light > level, introduced in 3952bf3e98c76c31594529a3fe34e056d3e3e2ea , > with X265_BUILD 75. As we already require X265_BUILD of at least > 89, no further conditions are required.

[FFmpeg-devel] [PATCH] tests: Remove fate-libx265-hdr10

2024-03-22 Thread Zhao Zhili
From: Zhao Zhili The test depends on the compile option of x265. It failed when HIGH_BIT_DEPTH isn't enabled. It also failed when asan is enabled because of memory issue inside of x265, which I don't think can be fixed within FFmpeg. --- tests/fate/enc_external.mak | 5 - test

Re: [FFmpeg-devel] [PATCH v6] avcodec/libx264: fix extradata when config annexb=0

2024-03-22 Thread Zhao Zhili
> On Mar 22, 2024, at 18:36, Anton Khirnov wrote: > >> Subject: Re: [FFmpeg-devel] [PATCH v6] avcodec/libx264: fix extradata when >> config annexb=0 > > This could really use more explanation on what exactly is broken. Added detailed description and pushed, thanks! > > -- > Anton Khirnov

Re: [FFmpeg-devel] [PATCH] avcodec/libx264: Remove unused variable

2024-03-22 Thread Zhao Zhili
> -Original Message- > From: ffmpeg-devel On Behalf Of Andreas > Rheinhardt > Sent: 2024年3月22日 21:03 > To: ffmpeg-devel@ffmpeg.org > Cc: Andreas Rheinhardt > Subject: [FFmpeg-devel] [PATCH] avcodec/libx264: Remove unused variable > > Signed-off-by: Andreas Rheinhardt > --- > libavcod

Re: [FFmpeg-devel] [PATCH] libavformat\file:Fix duplicate JNI symbols

2024-03-23 Thread Zhao Zhili
On 2024/3/24 03:05, ad...@shaoxia.xyz wrote: From: 联盟少侠 Could you configure git to avoid Chinese character? The errors indicate that there are multiple definitions of several JNI (Java Native Interface) symbols in the FFmpeg library. Specifically, the linker ld.lld has found duplicate defi

[FFmpeg-devel] [PATCH] avformat/file: Fix duplicate symbol ff_jni_*

2024-03-23 Thread Zhao Zhili
From: Zhao Zhili --- libavformat/Makefile | 1 + libavformat/ffjni.c | 1 + libavformat/file.c | 3 +-- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 libavformat/ffjni.c diff --git a/libavformat/Makefile b/libavformat/Makefile index 44aa485029..e10ad436a8 100644 --- a

Re: [FFmpeg-devel] [PATCH] libavformat\file:Fix duplicate JNI symbols

2024-03-23 Thread Zhao Zhili
On 2024/3/24 10:16, Zhao Zhili wrote: diff --git a/libavformat/file.c b/libavformat/file.c index dd5819c..fa13ae9 100644 --- a/libavformat/file.c +++ b/libavformat/file.c @@ -43,7 +43,7 @@   #if CONFIG_ANDROID_CONTENT_PROTOCOL   #include   #include "libavcodec/jni.h" -#include &

Re: [FFmpeg-devel] [PATCH] libavformat\file:Fix duplicate JNI symbols

2024-03-24 Thread Zhao Zhili
On 2024/3/24 21:23, Andreas Rheinhardt wrote: ad...@shaoxia.xyz: From: 联盟少侠 The errors indicate that there are multiple definitions of several JNI (Java Native Interface) symbols in the FFmpeg library. Specifically, the linker ld.lld has found duplicate definitions for the following symbols

[FFmpeg-devel] [PATCH] avcodec/h264_mp4toannexb: Fix heap buffer overflow

2024-03-25 Thread Zhao Zhili
From: Zhao Zhili Fixes: out of array write Fixes: 64407/clusterfuzz-testcase-minimized-ffmpeg_BSF_H264_MP4TOANNEXB_fuzzer-4966763443650560 mp4toannexb_filter counts the number of bytes needed in the first pass and allocate the memory, then do memcpy in the second pass. Update sps/pps size in

[FFmpeg-devel] [PATCH] examples/transcode: flush decoder on EOF

2023-08-10 Thread Zhao Zhili
From: Zhao Zhili Signed-off-by: Zhao Zhili --- doc/examples/transcode.c | 31 +-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/doc/examples/transcode.c b/doc/examples/transcode.c index 305181663c..ed6ac9fa03 100644 --- a/doc/examples/transcode.c

[FFmpeg-devel] [PATCH] avutil/channel_layout: make pre-defined channel layouts C++ friendly

2023-08-16 Thread Zhao Zhili
From: Zhao Zhili C++ doesn't support designated initializers until C++20. We have a bunch of pre-defined channel layouts, the gains to make them usable in C++ exceed the losses. Signed-off-by: Zhao Zhili --- libavutil/channel_layout.h | 4 ++-- 1 file changed, 2 insertions(+), 2 dele

Re: [FFmpeg-devel] [PATCH] avutil/channel_layout: make pre-defined channel layouts C++ friendly

2023-08-16 Thread Zhao Zhili
> From: ffmpeg-devel On Behalf Of James Almer > Sent: 2023年8月17日 0:22 > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH] avutil/channel_layout: make pre-defined > channel layouts C++ friendly > > On 8/16/2023 12:44 PM, Zhao Zhili wrote: > >

[FFmpeg-devel] [PATCH v2] avutil/channel_layout: make pre-defined channel layouts C++ friendly

2023-08-17 Thread Zhao Zhili
From: Zhao Zhili C++ doesn't support designated initializers until C++20. We have a bunch of pre-defined channel layouts, the gains to make them usable in C++ exceed the losses. Bump minor version so C++ project can check before use these defines. Also initialize .opaque field explicit

[FFmpeg-devel] [PATCH 2/3] avfilter/dnn_backend_openvino: fix multiple memleaks

2023-08-18 Thread Zhao Zhili
From: Zhao Zhili Signed-off-by: Zhao Zhili --- libavfilter/dnn/dnn_backend_openvino.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn/dnn_backend_openvino.c index 46cbe8270e..071516b17d 100644 --- a/libavfilter/dnn

[FFmpeg-devel] [PATCH 3/3] avfilter/dnn_backend_openvino: reduce indentation in free_model_ov

2023-08-18 Thread Zhao Zhili
From: Zhao Zhili No functional changes. Signed-off-by: Zhao Zhili --- libavfilter/dnn/dnn_backend_openvino.c | 75 +- 1 file changed, 39 insertions(+), 36 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn/dnn_backend_openvino.c index

[FFmpeg-devel] [PATCH 1/3] avfilter/dnn_filter_common: fix memleak

2023-08-18 Thread Zhao Zhili
From: Zhao Zhili Signed-off-by: Zhao Zhili --- libavfilter/dnn_filter_common.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libavfilter/dnn_filter_common.c b/libavfilter/dnn_filter_common.c index d175c91914..3b9182c1d1 100644 --- a/libavfilter/dnn_filter_common.c +++ b/libavfilter

[FFmpeg-devel] [RFC PATCH] avutil/avutil: make AV_TIME_BASE_Q available in C++

2023-08-18 Thread Zhao Zhili
From: Zhao Zhili It still different than AV_TIME_BASE_Q in C, like you cannot take address of AV_TIME_BASE_Q in C++. It's better than nothing. --- libavutil/avutil.h | 5 + 1 file changed, 5 insertions(+) diff --git a/libavutil/avutil.h b/libavutil/avutil.h index 64b68bdbd3..5201c

[FFmpeg-devel] [PATCH 1/3] avfilter/vf_scale_vt: fix output frame dimension

2023-08-18 Thread Zhao Zhili
From: Zhao Zhili The output frame dimension is incorrect because it shares hardware frame context with input. Signed-off-by: Zhao Zhili --- libavfilter/vf_scale_vt.c | 25 + 1 file changed, 25 insertions(+) diff --git a/libavfilter/vf_scale_vt.c b/libavfilter

[FFmpeg-devel] [PATCH 3/3] avfilter/vf_transpose_vt: fix declaration-after-statement

2023-08-18 Thread Zhao Zhili
From: Zhao Zhili Signed-off-by: Zhao Zhili --- libavfilter/vf_transpose_vt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_transpose_vt.c b/libavfilter/vf_transpose_vt.c index da59479a4b..a3b2b9be79 100644 --- a/libavfilter/vf_transpose_vt.c +++ b

[FFmpeg-devel] [PATCH 2/3] avfilter/vf_transpose_vt: fix output frame dimension

2023-08-18 Thread Zhao Zhili
From: Zhao Zhili Create a new hardware frame context when necessary. Signed-off-by: Zhao Zhili --- libavfilter/vf_transpose_vt.c | 47 +++ 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/libavfilter/vf_transpose_vt.c b/libavfilter

[FFmpeg-devel] [PATCH] avformat/mov: add io_order option to disable demuxer level interleave

2023-08-28 Thread Zhao Zhili
From: Zhao Zhili For bad interleaved files, manually interleave multiple tracks at the demuxer level can trigger seeking back and forth, which can be dramatically slow depending on the protocol. Demuxer level interleave can be useless sometimes, e.g., reading mp4 via http and then transcoding

[FFmpeg-devel] [PATCH] avutil/avutil: make AV_TIME_BASE_Q available in C++

2023-08-28 Thread Zhao Zhili
From: Zhao Zhili ISO C++ forbids compound-literals. It's not available with MSVC. This is a known issue from 10 years ago, and that's why there is a av_get_time_base_q(). Since we have no plan to remove AV_TIME_BASE_Q, just make it available in C++. There are multiple choices: 1.

Re: [FFmpeg-devel] [PATCH] avformat/mov: add io_order option to disable demuxer level interleave

2023-08-31 Thread Zhao Zhili
> From: ffmpeg-devel On Behalf Of Derek > Buitenhuis > Sent: 2023年8月31日 23:59 > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH] avformat/mov: add io_order option to > disable demuxer level interleave > > On 8/28/2023 5:06 PM, Zhao Zhili wrote: >

Re: [FFmpeg-devel] [PATCH 2/2] lavc/videotoolboxenc: enable low-latency mode for HEVC

2023-08-31 Thread Zhao Zhili
> From: ffmpeg-devel On Behalf Of Jun Zhao > Sent: 2023年8月31日 22:50 > To: ffmpeg-devel@ffmpeg.org > Cc: Jun Zhao ; Jun Zhao > Subject: [FFmpeg-devel] [PATCH 2/2] lavc/videotoolboxenc: enable low-latency > mode for HEVC > > Enable the HEVC encoder that supports low-latency mode. > > Signed-off

[FFmpeg-devel] [PATCH v2 0/8] avfilter: cleanup openvino

2023-09-02 Thread Zhao Zhili
From: Zhao Zhili v2: rebase on master. Please pay attension that there are a lot memleaks I don't have time to fix. With only 100 seconds of video clip, it leaks: SUMMARY: AddressSanitizer: 1416800 byte(s) leaked in 27808 allocation(s). Zhao Zhili (8): avfilter/dnn_filter_common

[FFmpeg-devel] [PATCH v2 1/8] avfilter/dnn_filter_common: fix memleak

2023-09-02 Thread Zhao Zhili
From: Zhao Zhili Signed-off-by: Zhao Zhili --- libavfilter/dnn_filter_common.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libavfilter/dnn_filter_common.c b/libavfilter/dnn_filter_common.c index d175c91914..3b9182c1d1 100644 --- a/libavfilter/dnn_filter_common.c +++ b/libavfilter

[FFmpeg-devel] [PATCH v2 2/8] avfilter/dnn_backend_openvino: fix multiple memleaks

2023-09-02 Thread Zhao Zhili
From: Zhao Zhili Signed-off-by: Zhao Zhili --- libavfilter/dnn/dnn_backend_openvino.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn/dnn_backend_openvino.c index 4922833b07..951f179b7c 100644 --- a

[FFmpeg-devel] [PATCH v2 3/8] avfilter/dnn_backend_openvino: reduce indentation in free_model_ov

2023-09-02 Thread Zhao Zhili
From: Zhao Zhili No functional changes except ensures model isn't null. Signed-off-by: Zhao Zhili --- libavfilter/dnn/dnn_backend_openvino.c | 89 +- 1 file changed, 46 insertions(+), 43 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavf

[FFmpeg-devel] [PATCH v2 5/8] avfilter/dnn_backend_openvino: fix leak or ov_core_t on error path

2023-09-02 Thread Zhao Zhili
From: Zhao Zhili --- libavfilter/dnn/dnn_backend_openvino.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn/dnn_backend_openvino.c index 7150bf0886..b3910adfc3 100644 --- a/libavfilter/dnn/dnn_backend_openvino.c +++ b

[FFmpeg-devel] [PATCH v2 7/8] avfilter/dnn_backend_openvino: fix input_port/output_port leaks

2023-09-02 Thread Zhao Zhili
From: Zhao Zhili --- libavfilter/dnn/dnn_backend_openvino.c | 4 1 file changed, 4 insertions(+) diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn/dnn_backend_openvino.c index f9944211da..5de27719b2 100644 --- a/libavfilter/dnn/dnn_backend_openvino.c +++ b/libavfilter

[FFmpeg-devel] [PATCH v2 6/8] avfilter/dnn_backend_openvino: fix leak of ov_shape_t

2023-09-02 Thread Zhao Zhili
From: Zhao Zhili --- libavfilter/dnn/dnn_backend_openvino.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn/dnn_backend_openvino.c index b3910adfc3..f9944211da 100644 --- a/libavfilter/dnn

[FFmpeg-devel] [PATCH v2 8/8] avfilter/dnn_backend_openvino: fix wild pointer on error path

2023-09-02 Thread Zhao Zhili
From: Zhao Zhili When ov_model_const_input_by_name/ov_model_const_output_by_name failed, input_port/output_port can be wild pointer. Signed-off-by: Zhao Zhili --- libavfilter/dnn/dnn_backend_openvino.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libavfilter

[FFmpeg-devel] [PATCH v2 4/8] avfilter/dnn_backend_openvino: fix use uninitialized values

2023-09-02 Thread Zhao Zhili
From: Zhao Zhili Error handling was broken since neither `ret` nor `task` has being initialized on error path. --- libavfilter/dnn/dnn_backend_openvino.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn

Re: [FFmpeg-devel] [PATCH] avcodec/av1dec: don't set aspect ratio when it's not yet known

2023-09-06 Thread Zhao Zhili
On Wed, 2023-09-06 at 11:14 -0300, James Almer wrote: > Makes the output of the native decoder consistent with external > decoders like > libdav1d with fate-enhanced-flv-av1. > > Signed-off-by: James Almer > --- >  libavcodec/av1dec.c | 1 - >  tests/ref/fate/enhanced-flv-av1 | 2 +- >

[FFmpeg-devel] [PATCH v2] avformat/mov: add interleaved_read option

2023-09-09 Thread Zhao Zhili
From: Zhao Zhili For bad interleaved files, manually interleave multiple tracks at the demuxer level can trigger seeking back and forth, which can be dramatically slow depending on the protocol. Demuxer level interleave can be useless sometimes, e.g., reading mp4 via http and then transcoding

[FFmpeg-devel] [PATCH v3] avformat/mov: add interleaved_read option

2023-09-11 Thread Zhao Zhili
From: Zhao Zhili For bad interleaved files, manually interleave multiple tracks at the demuxer level can trigger seeking back and forth, which can be dramatically slow depending on the protocol. Demuxer level interleave can be useless sometimes, e.g., reading mp4 via http and then transcoding

[FFmpeg-devel] [PATCH] avfilter/vf_smartblur: pass old context to sws_getCachedContext

2023-09-15 Thread Zhao Zhili
From: Zhao Zhili Otherwise it make no sense to use sws_getCachedContext. --- libavfilter/vf_smartblur.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_smartblur.c b/libavfilter/vf_smartblur.c index 85d8d502e1..ae0ec05b2d 100644 --- a/libavfilter

[FFmpeg-devel] [PATCH 1/2] avdevice/android_camera: fix missing include for usleep

2023-09-16 Thread Zhao Zhili
From: Zhao Zhili Signed-off-by: Zhao Zhili --- libavdevice/android_camera.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavdevice/android_camera.c b/libavdevice/android_camera.c index 1934999c18..0425b27518 100644 --- a/libavdevice/android_camera.c +++ b/libavdevice/android_camera.c

[FFmpeg-devel] [PATCH 2/2] avcodec/jni: make global variables static

2023-09-16 Thread Zhao Zhili
From: Zhao Zhili Signed-off-by: Zhao Zhili --- libavcodec/jni.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/jni.c b/libavcodec/jni.c index 85dcf2abaf..ae6490de9d 100644 --- a/libavcodec/jni.c +++ b/libavcodec/jni.c @@ -34,8 +34,8 @@ #include "liba

Re: [FFmpeg-devel] [PATCH] avfilter/vf_smartblur: pass old context to sws_getCachedContext

2023-09-20 Thread Zhao Zhili
On Fri, 2023-09-15 at 23:16 +0800, Zhao Zhili wrote: > From: Zhao Zhili > > Otherwise it make no sense to use sws_getCachedContext. > --- >  libavfilter/vf_smartblur.c | 2 +- >  1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavfilter/vf_s

Re: [FFmpeg-devel] [PATCH] ffplay: fix autoexit doesn't work in the case of pb->error

2020-09-06 Thread Zhao Zhili
> On Aug 27, 2020, at 4:20 PM, Marton Balint wrote: > > > > On Thu, 27 Aug 2020, Zhao Zhili wrote: > >> --- >> Goto fail will make ffplay exit immediately. I'm not sure >> it is the expected behavior. How about just remove the >> check on p

[FFmpeg-devel] [PATCH v2 2/2] avformat/rtsp: fix parse_rtsp_message

2020-09-08 Thread Zhao Zhili
1. Remove the assumption that the message method is TEARDOWN. 2. Don't ignore the error code of ff_rtsp_parse_streaming_commands. --- libavformat/rtsp.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 597413803f..3e69ab7287 100

[FFmpeg-devel] [PATCH v2 1/2] avformat/rtsp: fix infinite loop with udp transport

2020-09-08 Thread Zhao Zhili
sender: ./ffmpeg -i test.mp4 -c copy -f rtsp -rtsp_transport udp rtsp://localhost:12345/live.sdp receiver: ./ffmpeg_g -y -rtsp_flags listen -timeout 100 -i rtsp://localhost:12345/live.sdp -c copy test.mp4 --- libavformat/rtsp.c| 2 ++ libavformat/rtsp.h| 1 + libavformat/rtspdec.c | 2

Re: [FFmpeg-devel] [PATCH] examples/decode_video: flush parser to fix missing frame

2020-09-08 Thread Zhao Zhili
Please help review the patch, thanks. > On Aug 18, 2020, at 7:59 PM, quinkbl...@foxmail.com wrote: > > From: Zhao Zhili > > To reproduce, run decode_video with a single frame sample. No frame > was decoded before the patch. > --- > doc/examples/decode_video.c | 12 +

Re: [FFmpeg-devel] [PATCH] avformat/mov: make compatible brands more readable

2020-09-09 Thread Zhao Zhili
> On Sep 9, 2020, at 9:51 PM, Derek Buitenhuis > wrote: > > On 09/09/2020 14:07, quinkbl...@foxmail.com wrote: >> From: Zhao Zhili >> >> Use comma as separator between multiple compatible brands. >> --- >> libavformat/mov.c | 24 +++

Re: [FFmpeg-devel] [PATCH] avformat/mov: make compatible brands more readable

2020-09-09 Thread Zhao Zhili
> On Sep 9, 2020, at 10:24 PM, James Almer wrote: > > On 9/9/2020 10:07 AM, quinkbl...@foxmail.com wrote: >> From: Zhao Zhili >> >> Use comma as separator between multiple compatible brands. > > Wont this potentially break parsing of the output of

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/videotoolboxenc: fix use after destroy

2020-09-10 Thread Zhao Zhili
> 在 2020年9月10日,下午10:21,Richard Kern 写道: > >  > >> On Sep 10, 2020, at 8:57 AM, zhilizhao wrote: >> >>  >> >>>> On Aug 28, 2020, at 8:55 AM, Steven Liu wrote: >>> >>> 于2020年8月27日周四 下午5:39写道: >>>

[FFmpeg-devel] [PATCH 3/3] avformat/mov: remove an always true condition

2020-09-18 Thread Zhao Zhili
From: Zhao Zhili --- libavformat/mov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 9fc0db24d5..f99605c2cd 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1475,7 +1475,7 @@ static int mov_read_mvhd(MOVContext *c

[FFmpeg-devel] [PATCH 1/3] avformat/mov: replace multiple avio_r8() by avio_skip()

2020-09-18 Thread Zhao Zhili
From: Zhao Zhili --- libavformat/mov.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 9462af743a..8c1243b48d 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -103,9 +103,7 @@ static int mov_metadata_int8_bypass_padding

[FFmpeg-devel] [PATCH 2/3] avformat/mov: fix typo in comments

2020-09-18 Thread Zhao Zhili
From: Zhao Zhili --- libavformat/mov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 8c1243b48d..9fc0db24d5 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1473,7 +1473,7 @@ static int mov_read_mvhd(MOVContext *c

[FFmpeg-devel] [PATCH] avformat/udp: remove redundant setting of h->max_packet_size

2020-09-23 Thread Zhao Zhili
h->max_packet_size is being reset in the following code. --- libavformat/udp.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libavformat/udp.c b/libavformat/udp.c index 30d8041433..96d8b8ee11 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -650,9 +650,6 @@ static int udp_open(URL

[FFmpeg-devel] [PATCH] avformat/mov: move av_freep to if block to reduce no-ops

2020-09-23 Thread Zhao Zhili
Use the check since it's there already. --- libavformat/mov.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 4f64e96bc0..dcd263b02a 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2909,9 +2909,10 @@ static int mov_rea

[FFmpeg-devel] [PATCH] avformat/mov: make better use of av_fast_realloc and fix spurious ENOMEM

2020-09-23 Thread Zhao Zhili
If sc->ctts_allocated_size is larger than the new buffer size, av_fast_realloc() will return NULL. Since sc->ctts_data is freed, ctts_allocated_size should be reset to zero. It's better to avoid free sc->ctts_data at the first place to make better use of av_fast_realloc(). --- libavformat/mov.c |

[FFmpeg-devel] [PATCH v2] examples/decode_video: flush parser to fix missing frame

2020-09-23 Thread Zhao Zhili
To reproduce, run decode_video with a single frame sample. No frame was decoded before the patch. --- doc/examples/decode_video.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/examples/decode_video.c b/doc/examples/decode_video.c index 18ee90a6c0..9ce3531d63

Re: [FFmpeg-devel] [PATCH] examples/decode_video: flush parser to fix missing frame

2020-09-23 Thread Zhao Zhili
> On Sep 9, 2020, at 1:55 PM, Guangxin Xu wrote: > > > > On Tue, Aug 18, 2020 at 8:05 PM <mailto:quinkbl...@foxmail.com>> wrote: > From: Zhao Zhili mailto:quinkbl...@foxmail.com>> > > To reproduce, run decode_video with a single frame sample.

Re: [FFmpeg-devel] [PATCH] avformat/http: fix memleak

2020-09-23 Thread Zhao Zhili
Ping for review. > On Aug 24, 2020, at 12:58 AM, Zhao Zhili wrote: > > --- > libavformat/http.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/libavformat/http.c b/libavformat/http.c > index 6c39da1a8b..3d25d652d3 100644 > --- a/libavformat

Re: [FFmpeg-devel] [PATCH 1/2] avformat/utils: remove always true if()

2020-09-26 Thread Zhao Zhili
Ping for the patch set. > On Aug 25, 2020, at 1:16 AM, Zhao Zhili wrote: > > Ping again. > >> On Aug 5, 2020, at 11:16 PM, Zhao Zhili wrote: >> >> Ping for the trivial patch. >> >>> On Jul 29, 2020, at 1:02 AM, Zhao Zhili wrote: >>> &

Re: [FFmpeg-devel] [PATCH] avformat/http: set hostname and lower_url buffer size properly

2020-09-26 Thread Zhao Zhili
Ping for review, thanks. > On Aug 24, 2020, at 11:10 PM, Zhao Zhili wrote: > > 1. The buffer size of lower_url shouldn't be smaller than hostname > 2. The maximum length of a DNS name is 255 octets > --- > libavformat/http.c | 4 ++-- > 1 file changed, 2 insertions(+)

Re: [FFmpeg-devel] [PATCH v2 1/2] avformat/rtsp: fix infinite loop with udp transport

2020-09-26 Thread Zhao Zhili
Ping for review, thanks. > On Sep 9, 2020, at 12:10 AM, Zhao Zhili wrote: > > sender: > ./ffmpeg -i test.mp4 -c copy -f rtsp -rtsp_transport udp > rtsp://localhost:12345/live.sdp > > receiver: > ./ffmpeg_g -y -rtsp_flags listen -timeout 100 -i > rtsp://local

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/videotoolboxenc: fix align issue

2020-09-26 Thread Zhao Zhili
Ping for the patch set. > On Aug 27, 2020, at 5:38 AM, quinkbl...@foxmail.com wrote: > > From: Zhao Zhili > > bool a53_cc is accessed as int: > src/libavutil/opt.c:129:9: runtime error: store to misaligned > address 0x7fbf454121a3 for type 'int',

Re: [FFmpeg-devel] [PATCH] avfilter/vf_delogo: remove duplicated code

2020-09-26 Thread Zhao Zhili
Ping. > On Sep 16, 2020, at 1:09 PM, quinkbl...@foxmail.com wrote: > > From: Zhao Zhili > > 1. Remove the modification of x, y, w and h parameters since they > are reset by filter_frame. > 2. config_input leads to error out when logo area is outside of the > frame

Re: [FFmpeg-devel] [PATCH] avformat/http: ensure reply code in the range of 100..599

2020-09-26 Thread Zhao Zhili
Ping for review, thanks. > On Sep 1, 2020, at 12:34 PM, quinkbl...@foxmail.com wrote: > > From: Zhao Zhili > > --- > libavformat/http.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavformat/http.c b/libavformat/http.c > index 6c39da1

[FFmpeg-devel] [PATCH v3 2/2] avformat/rtsp: fix parse_rtsp_message

2020-09-27 Thread Zhao Zhili
1. Remove the assumption that the message method is TEARDOWN. 2. Don't ignore the error code of ff_rtsp_parse_streaming_commands. --- libavformat/rtsp.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 597413803f..3e69ab7287 100

[FFmpeg-devel] [PATCH v3 1/2] avformat/rtsp: fix infinite loop with udp transport

2020-09-27 Thread Zhao Zhili
Fix #8840. Steps to reproduce: 1. sender: ./ffmpeg -i test.mp4 -c copy -f rtsp -rtsp_transport udp rtsp://localhost:12345/live.sdp 2. receiver: ./ffmpeg_g -y -rtsp_flags listen -timeout 100 -i rtsp://localhost:12345/live.sdp -c copy test.mp4 --- v3: mention the ticket. libavformat/rtsp.c|

Re: [FFmpeg-devel] [PATCH] rtsp: Fix infinite loop in listen mode with UDP transport

2020-09-30 Thread Zhao Zhili
Hi Martin, On 9/30/20 5:41 PM, Martin Storsjö wrote: In listen mode with UDP transport, once the sender has sent the TEARDOWN and closed the connection, poll will indicate that one can read from the connection (indicating that the socket has reached EOF and should be closed by the receiver as we

Re: [FFmpeg-devel] [PATCH] rtsp: Fix infinite loop in listen mode with UDP transport

2020-10-01 Thread Zhao Zhili
On 10/1/20 4:15 AM, Martin Storsjö wrote: On Wed, 30 Sep 2020, Zhao Zhili wrote: Hi Martin, On 9/30/20 5:41 PM, Martin Storsjö wrote: In listen mode with UDP transport, once the sender has sent the TEARDOWN and closed the connection, poll will indicate that one can read from the connection

Re: [FFmpeg-devel] [PATCH] rtsp: Fix infinite loop in listen mode with UDP transport

2020-10-02 Thread Zhao Zhili
On 10/2/20 4:48 AM, Martin Storsjö wrote: On Thu, 1 Oct 2020, Andriy Gelman wrote: On Thu, 01. Oct 22:00, Zhao Zhili wrote: On 10/1/20 4:15 AM, Martin Storsjö wrote: > On Wed, 30 Sep 2020, Zhao Zhili wrote: > > > Hi Martin, > > > > On 9/30/20 5:41 PM, Martin Storsj

Re: [FFmpeg-devel] [PATCH] avformat/udp: remove redundant setting of h->max_packet_size

2020-10-11 Thread Zhao Zhili
Ping. On Thu, Sep 24, 2020 at 12:15 AM Zhao Zhili https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ff

Re: [FFmpeg-devel] [PATCH v2] examples/decode_video: flush parser to fix missing frame

2020-10-11 Thread Zhao Zhili
Ping for review. > On Sep 24, 2020, at 2:01 AM, Zhao Zhili https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffm

Re: [FFmpeg-devel] [PATCH 3/3] avformat/mov: remove an always true condition

2020-10-17 Thread Zhao Zhili
> On Sep 18, 2020, at 10:33 PM, Zhao Zhili wrote: > > From: Zhao Zhili > > --- > libavformat/mov.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavformat/mov.c b/libavformat/mov.c > index 9fc0db24d5..f99605c2cd 100644 >

Re: [FFmpeg-devel] [PATCH] avformat/mov: make better use of av_fast_realloc and fix spurious ENOMEM

2020-10-17 Thread Zhao Zhili
Ping for review. > On Sep 24, 2020, at 1:28 AM, Zhao Zhili wrote: > > If sc->ctts_allocated_size is larger than the new buffer size, > av_fast_realloc() will return NULL. Since sc->ctts_data is freed, > ctts_allocated_size should be reset to zero. It's better to avo

Re: [FFmpeg-devel] [PATCH v3 7/8] avcodec/movtextenc: Remove redundant function parameters

2020-10-17 Thread Zhao Zhili
> On Oct 17, 2020, at 3:37 PM, Andreas Rheinhardt > wrote: > > It makes no sense to call the functions to write styl, hlit or hclr boxes > with a different box name than "styl", "hlit" or "hclr". Therefore this > commit inlines these values in the functions, removes the function > parameter co

Re: [FFmpeg-devel] [PATCH] avformat/dhav: also support ZLAV packets

2020-10-24 Thread Zhao Zhili
Hi Michael, > On Oct 24, 2020, at 8:32 AM, Michael Keeley wrote: > > Some DVRs (e.g. D7008FH made by Zhuhai Ltd) output the same format .dav file, > but use ZLAV/zlav tags to delimit the packets instead of DHAV/dhav. Zhuhai Ltd doesn't look like the real company name. I didn't find much inform

[FFmpeg-devel] [PATCH] avformat/rtpenc: add option to disable STAP for H.264

2020-11-04 Thread Zhao Zhili
Use non-interleaved mode but disable STAP is a valid use case, for example, the receiver doesn't support STAP. --- libavformat/rtpenc.h | 2 ++ libavformat/rtpenc_h264_hevc.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/rtpenc.h b/libavformat/rtpenc.h

Re: [FFmpeg-devel] [PATCH 1/6] avformat/rtsp: 16384 -> SDP_MAX_SIZE

2020-11-09 Thread Zhao Zhili
> On Nov 4, 2020, at 9:37 PM, lance.lmw...@gmail.com wrote: > > From: Limin Wang > > Signed-off-by: Limin Wang > --- > libavformat/rtsp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c > index 49c2d52..1b876c9 100644 > --- a/li

Re: [FFmpeg-devel] [PATCH] fftools/ffplay: fix rotation incorrect when frame contains the side_data(type is AV_FRAME_DATA_DISPLAYMATRIX)

2022-08-31 Thread Zhao Zhili
> -Original Message- > From: ffmpeg-devel-boun...@ffmpeg.org On > Behalf Of 1035567...@qq.com > Sent: 2022年8月31日 18:45 > To: ffmpeg-devel@ffmpeg.org > Cc: Wang Yaqiang ; 1445440...@qq.com > Subject: [FFmpeg-devel] [PATCH] fftools/ffplay: fix rotation incorrect when > frame contains the

[FFmpeg-devel] [PATCH] fftools/ffmpeg: fix av_display_rotation_set() type cast

2022-08-31 Thread Zhao Zhili
From: Zhao Zhili Signed-off-by: Zhao Zhili --- fftools/ffmpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index fbabbe6ea2..ecaf3bd984 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -3263,7 +3263,7 @@ static int

Re: [FFmpeg-devel] [PATCH v3] fftools/ffplay: fix rotation incorrect when frame contains the displaymatrix

2022-09-05 Thread Zhao Zhili
On Mon, 2022-09-05 at 18:40 +0800, 1035567...@qq.com wrote: > From: Wang Yaqiang > > For example, if the jpeg contains exif information > and the rotation direction is included in the exif, > the displaymatrix will be set on the side_data of the frame when > decoding. > However, when ffplay is us

[FFmpeg-devel] [PATCH] swresample/swresample: fix assert failure

2022-09-09 Thread Zhao Zhili
From: Zhao Zhili Fix #9908. Regression since 8a5896ec1f6. Signed-off-by: Zhao Zhili --- libswresample/swresample.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libswresample/swresample.c b/libswresample/swresample.c index 6f04d130d3..624309c2a0 100644 --- a/libswresample/swresample.c

Re: [FFmpeg-devel] [PATCH] avformat/mov: get the correct fragment stsd_id when decrypting the sample

2022-09-16 Thread Zhao Zhili
> From: Wang Yaqiang > > When determining whether a packet should be decrypted, > should use the stsd_id of the fragment where the current packet is located. > > Signed-off-by: Wang Yaqiang > --- > libavformat/isom.h | 1 + > libavformat/mov.c | 7 --- > 2 files changed, 5 insertions(+)

[FFmpeg-devel] [PATCH] fftools/ffmpeg_filter: configure min_hard_comp unconditionally

2022-09-16 Thread Zhao Zhili
From: Zhao Zhili There are two issues here. Firstly, the floating-point comparison is always true. Seconly, the code depends on the default value of min_hard_comp implicitly, which can be dangerous. Partially fixes ticket 9859. --- fftools/ffmpeg_filter.c | 3 +-- 1 file changed, 1 insertion

[FFmpeg-devel] [PATCH] avcodec/mjpegdec: fix -Wparentheses warning

2022-09-23 Thread Zhao Zhili
From: Zhao Zhili Signed-off-by: Zhao Zhili --- libavcodec/mjpegdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index c594950500..d77c644d3b 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -2866,7 +2866,7

Re: [FFmpeg-devel] [PATCH] avcodec/mjpegdec: fix -Wparentheses warning

2022-09-23 Thread Zhao Zhili
> -Original Message- > From: ffmpeg-devel-boun...@ffmpeg.org On > Behalf Of Andreas Rheinhardt > Sent: 2022年9月23日 23:11 > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH] avcodec/mjpegdec: fix -Wparentheses > warning > > Zhao

Re: [FFmpeg-devel] [PATCH] avcodec/mjpegdec: fix -Wparentheses warning

2022-09-23 Thread Zhao Zhili
3. syyskuuta 2022, 20.40.30 EEST Zhao Zhili a écrit : > > From: Zhao Zhili > > > > Signed-off-by: Zhao Zhili > > --- > > libavcodec/mjpegdec.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/libavcodec/mjpegdec.

[FFmpeg-devel] [PATCH 1/2] avformat/mp3dec: avoid seek back and forth

2022-09-24 Thread Zhao Zhili
From: Zhao Zhili avio_seek() is called inside check(). Seeking to 'off' then seeking to 'off + i' is unefficient, and it can loop 64 * 1024 times in the worst case. When probe a malformed file over HTTP, it looks like stucked forvever. ffio_ensure_seekback() doesn't

[FFmpeg-devel] [PATCH 2/2] avformat/mp3dec: remove a call to avio_tell()

2022-09-24 Thread Zhao Zhili
From: Zhao Zhili --- libavformat/mp3dec.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c index a9e494452d..05c13228bc 100644 --- a/libavformat/mp3dec.c +++ b/libavformat/mp3dec.c @@ -424,15 +424,14 @@ static int

Re: [FFmpeg-devel] [PATCH] avformat/mov: Speed up finding MOVFragmentIndexItem

2022-09-26 Thread Zhao Zhili
> -Original Message- > From: ffmpeg-devel-boun...@ffmpeg.org On > Behalf Of Andreas Rheinhardt > Sent: 2022年9月25日 7:21 > To: ffmpeg-devel@ffmpeg.org > Cc: Andreas Rheinhardt > Subject: [FFmpeg-devel] [PATCH] avformat/mov: Speed up finding > MOVFragmentIndexItem > > The MOVFragmentInd

[FFmpeg-devel] [PATCH] avformat/mpegtsenc: add pcr_at_keyframe flag

2022-09-27 Thread Zhao Zhili
From: Zhao Zhili Add PCR at keyframe can be undesirable when -pcr_period is specified. Add an flag to disable this behavior. Signed-off-by: Zhao Zhili --- doc/muxers.texi | 2 ++ libavformat/mpegtsenc.c | 8 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/doc

<    1   2   3   4   5   6   7   8   9   10   >