From: Zhao Zhili
Fix two cases of memleaks:
1. The leak of dv_demux
2. The leak of dv_fctx upon dv_demux allocate failure
---
libavformat/mov.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index adc52de947..f179b6efdd 100644
---
From: Zhao Zhili
---
libavfilter/formats.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/libavfilter/formats.c b/libavfilter/formats.c
index 31ee445c49..15c3adf80b 100644
--- a/libavfilter/formats.c
+++ b/libavfilter/formats.c
@@ -317,7 +317,6 @@ do {
From: Zhao Zhili
---
tests/dnn/dnn-layer-pad-test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/dnn/dnn-layer-pad-test.c b/tests/dnn/dnn-layer-pad-test.c
index 1fb2be1590..ea8c824d1e 100644
--- a/tests/dnn/dnn-layer-pad-test.c
+++ b/tests/dnn/dnn-layer-pad-test.c
@@
From: Zhao Zhili
---
libavfilter/avfilter.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 9d70e7118b..3eaa8a4089 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -79,7 +79,7 @@ int avfilter_pad_count(c
From: Zhao Zhili
---
libavfilter/avfilter.h | 5 -
1 file changed, 5 deletions(-)
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 3eaa8a4089..3c87f4864a 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -572,11 +572,6 @@ struct AVFilterLink {
*/
From: Zhao Zhili
---
libavutil/frame.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/libavutil/frame.c b/libavutil/frame.c
index dcf1fc3d17..bb20e99331 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -692,10 +692,23 @@ AVFrameSideData *av_frame_new_side_data_from_b
From: Zhao Zhili
---
libavutil/frame.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavutil/frame.c b/libavutil/frame.c
index bb20e99331..9edf971c55 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -825,6 +825,7 @@ void av_frame_remove_side_data(AVFrame *frame, enum
AVFrameSid
From: Zhao Zhili
---
libavutil/frame.c | 13 +
libavutil/frame.h | 4
2 files changed, 17 insertions(+)
diff --git a/libavutil/frame.c b/libavutil/frame.c
index dcf1fc3d17..bb20e99331 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -692,10 +692,23 @@ AVFrameSideData
From: Zhao Zhili
---
libavformat/avformat.h | 4
1 file changed, 4 insertions(+)
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 6eb329f13f..acce242398 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -2162,6 +2162,8 @@ AVStream *avformat_new_stream(AV
From: Zhao Zhili
---
libavutil/frame.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavutil/frame.c b/libavutil/frame.c
index bb20e99331..9edf971c55 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -825,6 +825,7 @@ void av_frame_remove_side_data(AVFrame *frame, enum
AVFrameSid
From: Zhao Zhili
---
libavcodec/avcodec.h | 4
1 file changed, 4 insertions(+)
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index bcb931f0dd..84dcf52285 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -4486,6 +4486,8 @@ void av_free_packet(AVPacket *pkt);
/**
From: Zhao Zhili
vp7 decoder doesn't set update_thread_context field
---
libavcodec/vp8.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index eb51d1f3c9..b4deb3ed67 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -2715,7 +2715,8
From: Zhao Zhili
webp decoder doesn't set update_thread_context field
$ ffmpeg -i rgb_q80.webp -f null -
[webp @ 0x7ffbd5823200] Multiple ff_thread_finish_setup() calls
---
libavcodec/vp8.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
From: Zhao Zhili
In case of av_bprint_finalize failed.
---
libavfilter/graphdump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/graphdump.c b/libavfilter/graphdump.c
index 8bc7b162d7..79ef1a733f 100644
--- a/libavfilter/graphdump.c
+++ b/libavfilter/graphdump.c
From: Zhao Zhili
---
libavdevice/lavfi.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c
index ca8f05f3f7..c949ff7e12 100644
--- a/libavdevice/lavfi.c
+++ b/libavdevice/lavfi.c
@@ -302,9 +302,13 @@ av_cold static int lavfi_
From: Zhao Zhili
---
libavfilter/buffersrc.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c
index e0ff7e4dd8..bae7d86695 100644
--- a/libavfilter/buffersrc.c
+++ b/libavfilter/buffersrc.c
@@ -47,7 +47,6 @@ typedef struct BufferSourceContex
From: Zhao Zhili
---
doc/filters.texi| 4 +---
libavfilter/buffersrc.c | 8 ++--
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/doc/filters.texi b/doc/filters.texi
index 5fdec6f015..9b3c2d7c2d 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -21014,9 +21014,7 @
From: Zhao Zhili
---
doc/filters.texi| 4 +---
libavfilter/buffersrc.c | 14 --
libavfilter/version.h | 5 -
3 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/doc/filters.texi b/doc/filters.texi
index 5fdec6f015..9b3c2d7c2d 100644
--- a/doc/filters.texi
From: Zhao Zhili
---
patch v3: document how to set the parameters for automatically inserted filters.
doc/filters.texi| 7 +++
libavfilter/buffersrc.c | 14 --
libavfilter/version.h | 5 -
3 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/doc/filter
From: Zhao Zhili
---
patch v4: update doc
doc/filters.texi| 8
libavfilter/buffersrc.c | 14 --
libavfilter/version.h | 5 -
3 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/doc/filters.texi b/doc/filters.texi
index 5fdec6f015..d15cf74c84 1006
From: Zhao Zhili
The option is deprecated and ignored by buffersrc.
---
fftools/ffmpeg_filter.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index 72838de1e2..40cc4c191c 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftoo
From: Zhao Zhili
!(c->pix_fmt != AV_PIX_FMT_NONE || c->got_format_from_params)
equals
(c->pix_fmt == AV_PIX_FMT_NONE) && !c->got_format_from_params
1. When (c->pix_fmt == AV_PIX_FMT_NONE) is true, got_format_from_params is
always false, the flag doesn't contribute to the result.
2. When the f
From: Zhao Zhili
No functional changes. ref/unref vs add/sub is symmetrical.
---
libavutil/buffer.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavutil/buffer.c b/libavutil/buffer.c
index 8d1aa5fa84..f0034b026a 100644
--- a/libavutil/buffer.c
+++ b/libavutil/buffe
From: Zhao Zhili
---
libavfilter/buffersink.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c
index 25b3f4ab6b..30153adbb2 100644
--- a/libavfilter/buffersink.c
+++ b/libavfilter/buffersink.c
@@ -61,8 +61,6 @@ typedef struct BufferSinkCont
From: Zhao Zhili
The argument 'opaque' is always NULL since 0acf7e2 (2013).
---
libavfilter/buffersink.c | 35 ++-
1 file changed, 2 insertions(+), 33 deletions(-)
diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c
index 30153adbb2..5f2ed0e4b3 10064
From: Zhao Zhili
The patch breaks API in theory. Since there is no reason to allocate
an object which you can do nothing with it, the API break should have
no effect.
---
libavfilter/buffersink.c | 20
libavfilter/buffersink.h | 32
2 files c
From: Zhao Zhili
The argument 'opaque' is always NULL since 0acf7e2 (2013).
---
libavfilter/buffersink.c | 35 ++-
1 file changed, 2 insertions(+), 33 deletions(-)
diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c
index 30153adbb2..5f2ed0e4b3 10064
From: Zhao Zhili
---
libavfilter/buffersink.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c
index 25b3f4ab6b..30153adbb2 100644
--- a/libavfilter/buffersink.c
+++ b/libavfilter/buffersink.c
@@ -61,8 +61,6 @@ typedef struct BufferSinkCont
From: Zhao Zhili
---
libavfilter/buffersink.c | 2 ++
libavfilter/buffersink.h | 4
2 files changed, 6 insertions(+)
diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c
index 5f2ed0e4b3..76a46f6678 100644
--- a/libavfilter/buffersink.c
+++ b/libavfilter/buffersink.c
@@ -125,6
From: Zhao Zhili
---
libavfilter/avfilter.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 3eaa8a4089..197e12a625 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -947,7 +947,7 @@ AVFilterContext *avfil
From: Zhao Zhili
---
libavfilter/vf_histogram.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/libavfilter/vf_histogram.c b/libavfilter/vf_histogram.c
index 5185992de6..0d2d087beb 100644
--- a/libavfilter/vf_histogram.c
+++ b/libavfilter/vf_histogram.c
@@ -2
From: Zhao Zhili
---
libavfilter/vf_histogram.c | 4 +-
tests/ref/fate/filter-histogram-levels | 100 -
2 files changed, 52 insertions(+), 52 deletions(-)
diff --git a/libavfilter/vf_histogram.c b/libavfilter/vf_histogram.c
index 0d2d087beb..d6928d6b08 1006
From: Zhao Zhili
---
Rebase patch on master.
doc/filters.texi| 8
libavfilter/buffersrc.c | 14 --
libavfilter/version.h | 5 -
3 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/doc/filters.texi b/doc/filters.texi
index 619542e7b5..341503c7f8 1
From: Zhao Zhili
Fix av_pix_fmt_desc_get return value check.
---
libavcodec/imgconvert.c | 5 +++--
libavcodec/tests/imgconvert.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index 1fd636c83d..fb0222cdf1 100644
--
From: Zhao Zhili
---
libavdevice/lavfi.c | 24 ++--
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c
index c949ff7e12..fc2336d8fe 100644
--- a/libavdevice/lavfi.c
+++ b/libavdevice/lavfi.c
@@ -59,24 +59,28 @@ typedef st
From: Zhao Zhili
---
libavresample/options.c | 6 +++---
libavresample/utils.c | 13 +
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/libavresample/options.c b/libavresample/options.c
index 5f08cd7e52..cdab98c357 100644
--- a/libavresample/options.c
+++ b/libavres
From: Zhao Zhili
---
libswscale/tests/swscale.c | 17 +++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/libswscale/tests/swscale.c b/libswscale/tests/swscale.c
index 19878a7877..784195f468 100644
--- a/libswscale/tests/swscale.c
+++ b/libswscale/tests/swscale.c
@@
From: Zhao Zhili
---
doc/APIchanges| 3 +++
libavutil/pixdesc.c | 5 +
libavutil/pixdesc.h | 5 +
libavutil/pixfmt.h| 2 +-
libavutil/samplefmt.c | 5 +
libavutil/samplefmt.h | 7 ++-
libavutil/version.h | 2 +-
7 files changed, 26 insertions(+), 3 deletions(-)
From: Zhao Zhili
---
libavfilter/vf_dnn_processing.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/vf_dnn_processing.c b/libavfilter/vf_dnn_processing.c
index ce976ec3bd..afb7275a38 100644
--- a/libavfilter/vf_dnn_processing.c
+++ b/libavfilter/vf_dnn_processing
From: Zhao Zhili
---
libswscale/utils.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 57c4fd2b0f..c915cf0fca 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -95,7 +95,7 @@ typedef struct FormatEntry {
ui
From: Zhao Zhili
---
libavcodec/utils.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 8a49234bcd..c935e07538 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1510,7 +1510,7 @@ int av_get_exact_bits_per_sample(enu
From: Zhao Zhili
This is a micro-optimization. Saving almost 200 reallocations makes it
worth a try.
---
libavfilter/formats.c | 43 +++
1 file changed, 35 insertions(+), 8 deletions(-)
diff --git a/libavfilter/formats.c b/libavfilter/formats.c
index 33c6
From: Zhao Zhili
This is a micro-optimization. Saving almost 200 reallocations makes it
worth a try.
---
v3: fix an obvious infinite loop and pass fate-filter test
libavfilter/formats.c | 41 ++---
1 file changed, 34 insertions(+), 7 deletions(-)
diff --git
From: Zhao Zhili
---
libavfilter/vf_gblur.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/libavfilter/vf_gblur.c b/libavfilter/vf_gblur.c
index e057937fb7..0d7d5438d1 100644
--- a/libavfilter/vf_gblur.c
+++ b/libavfilter/vf_gblur.c
@@ -189,9 +189,6 @@ static void gaussi
From: Zhao Zhili
./ffmpeg -i ~/Pictures/test.jpg -vf 'gblur=sigma=0' -f null -
...
src/libavfilter/vf_gblur.c:260:59: runtime error: division by zero
src/libavfilter/vf_gblur.c:261:26: runtime error: division by zero
---
libavfilter/vf_gblur.c | 12 +---
1 file changed, 9 insertions(+),
From: Zhao Zhili
For 8 bit depth:
./ffmpeg -threads 1 -f lavfi -t 10 -i
'yuvtestsrc=size=4096x2048,format=yuv444p' -vf 'freezedetect' -f null
-benchmark -
Test results on Snapdragon 845:
Before:
frame= 250 fps= 23 q=-0.0 Lsize=N/A time=00:00:10.00 bitrate=N/A
speed=0.924x
From: Zhao Zhili
Use comma as separator between multiple compatible brands.
---
libavformat/mov.c | 24 +++-
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 690beb10ce..8f5341f925 100644
--- a/libavformat/mov.c
+++ b/
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, while filter_frame fix the parameters automatically. Make
config_input don't return error to keep the l
From: Zhao Zhili
---
libavfilter/vf_delogo.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavfilter/vf_delogo.c b/libavfilter/vf_delogo.c
index 39f06512fa..023fc51ec8 100644
--- a/libavfilter/vf_delogo.c
+++ b/libavfilter/vf_delogo.c
@@ -200,6 +200,7 @@ typedef struct
From: Zhao Zhili
User report: http://ffmpeg.org/pipermail/ffmpeg-user/2020-August/049494.html
server:
./ffmpeg -i test.mp4 -c copy -f rtsp -rtsp_transport udp
rtsp://localhost:12345/live.sdp
client:
./ffmpeg_g -y -rtsp_flags listen -timeout 100 -i
rtsp://localhost:12345/live.sdp -c copy test
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 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/doc/examples/decode_video.c b/doc/examples/decode_video.c
index 1691
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', which requires 4 byte alignment
---
libavcodec/videotoolboxenc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec
From: Zhao Zhili
The lock is used in clear_frame_queue().
---
libavcodec/videotoolboxenc.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
index 988782f10d..758db9641f 100644
--- a/libavcodec/videotoolbox
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 6c39da1a8b..b77bdf1567 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -168,7 +168,7 @@ static const AVOption options[] = {
{
54 matches
Mail list logo