From: Zhao Zhili
This can fix read/write error when user close the file descriptor
earlier. Now user can close the file descriptor earlier to avoid
file descriptor leak. So it's safer in both way.
---
libavformat/file.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
> From: ffmpeg-devel On Behalf Of Anton
> Khirnov
> Sent: 2022年12月9日 22:32
> To: FFmpeg development discussions and patches
> Cc: Zhao Zhili
> Subject: Re: [FFmpeg-devel] [PATCH] avformat/file: add fd protocol
>
> Quoting Zhao Zhili (2022-11-18 19:48:02)
> > Fr
From: Zhao Zhili
It's well known that mediacodec encoder requires 16x16 alignment.
Use our bsf to fix the crop info.
---
v3: don't change the dimension for AV_PIX_FMT_MEDIACODEC. It can have
side effect.
configure | 2 +
libavcodec/mediacodecenc.c | 78
On Thu, 2022-12-08 at 16:28 +0100, Andreas Rheinhardt wrote:
> Marvin Scholz:
> >
> > On 8 Dec 2022, at 16:11, Zhao Zhili wrote:
> >
> > > On Mon, 2022-12-05 at 10:51 +0800, zhilizhao(赵志立) wrote:
> > > > > On Nov 19, 2022, at
On Mon, 2022-11-28 at 00:55 +0800, Zhao Zhili wrote:
> From: Zhao Zhili
>
> ---
> libavcodec/mediacodecenc.c | 8 +++-
> libavcodec/version.h | 2 +-
> 2 files changed, 8 insertions(+), 2 deletions(-)
>
>
Applied.
On Thu, 2022-11-24 at 00:49 +0800, Zhao Zhili wrote:
> From: Zhao Zhili
>
> ---
> libavcodec/mediacodec_wrapper.c | 38 -
> --
> libavcodec/mediacodec_wrapper.h | 24 +++
> libavcodec/mediacodecdec_common.c | 4
&
On Mon, 2022-12-05 at 10:51 +0800, zhilizhao(赵志立) wrote:
> > On Nov 19, 2022, at 02:48, Zhao Zhili
> > wrote:
> >
> > From: Zhao Zhili
> >
> > Unlike the pipe protocol, fd protocol has seek support if it
> > corresponding to a regular file.
> &g
> From: ffmpeg-devel On Behalf Of Ben Temple
> Sent: 2022年12月7日 6:53
> To: ffmpeg-devel@ffmpeg.org; Zhao Zhili
> Subject: [FFmpeg-devel] Defect: MediaCodec Encoder - Pixel ColorSpace of many
> Adreno GPUs not supported
>
> MediaCodec Encoder: Pixel ColorSpac
From: Zhao Zhili
It's well known that mediacodec encoder requires 16x16 alignment.
Use our bsf to fix the crop info.
---
configure | 2 ++
libavcodec/mediacodecenc.c | 65 +++---
2 files changed, 63 insertions(+), 4 deletions(-)
diff --git
From: Zhao Zhili
It works since most of Android devices don't output B frames by
default. The behavior is documented by Android now, although there
is some exception in history, which should have been fixed now.
---
libavcodec/mediacodecenc.c | 8
libavcodec/version.h | 2 +-
2
From: Zhao Zhili
---
libavcodec/mediacodecenc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c
index 8e28a50e0d..e9cff8167a 100644
--- a/libavcodec/mediacodecenc.c
+++ b/libavcodec/mediacodecenc.c
@@ -264,6 +264,8 @@ static av_cold
From: Zhao Zhili
---
libavcodec/mediacodecenc.c | 23 +++
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c
index 69246ad693..4f9185342f 100644
--- a/libavcodec/mediacodecenc.c
+++ b/libavcodec
From: Zhao Zhili
v2:
Reorder 1/7 and 2/7.
Zhao Zhili (7):
avcodec/mediacodecenc: make each encoder has its own option
avcodec/mediacodecenc: add bitrate_mode option
avcodec/mediacodecenc: add level option
avcodec/mediacodecenc: use bsf to handle crop
avcodec/mediacodecenc: remove
From: Zhao Zhili
---
libavcodec/mediacodecenc.c | 143 -
libavcodec/version.h | 2 +-
2 files changed, 142 insertions(+), 3 deletions(-)
diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c
index ec0e0b3a86..2f78567451 100644
From: Zhao Zhili
---
libavcodec/mediacodecenc.c | 25 +
libavcodec/version.h | 2 +-
2 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c
index 4f9185342f..ec0e0b3a86 100644
--- a/libavcodec
From: Zhao Zhili
Use input PTS as DTS has multiple problems:
1. If there is no reordering, it's better to just use the output
PTS as DTS, since encoder may change the timestamp value (do it
on purpose or rounding error).
2. If there is reordering, input PTS should be shift a few frames
as DTS
From: Zhao Zhili
It works since most of Android devices don't output B frames by
default. The behavior is documented by Android now, although there
is some exception in history, which should have been fixed now.
---
libavcodec/mediacodecenc.c | 8
libavcodec/version.h | 2 +-
2
From: Zhao Zhili
---
libavcodec/mediacodecenc.c | 42 ++
1 file changed, 24 insertions(+), 18 deletions(-)
diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c
index c8d8f84e46..c28cce56c6 100644
--- a/libavcodec/mediacodecenc.c
+++ b
From: Zhao Zhili
---
libavcodec/mediacodecenc.c | 25 +
libavcodec/version.h | 2 +-
2 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c
index 69246ad693..c8d8f84e46 100644
--- a/libavcodec
From: Zhao Zhili
---
libavcodec/mediacodecenc.c | 143 -
libavcodec/version.h | 2 +-
2 files changed, 142 insertions(+), 3 deletions(-)
diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c
index c28cce56c6..d098880941 100644
From: Zhao Zhili
---
libavcodec/mediacodecenc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c
index 4b0397d1ea..9378563fac 100644
--- a/libavcodec/mediacodecenc.c
+++ b/libavcodec/mediacodecenc.c
@@ -264,6 +264,8 @@ static av_cold
From: Zhao Zhili
Use input PTS as DTS has multiple problems:
1. If there is no reordering, it's better to just use the output
PTS as DTS, since encoder may change the timestamp value (do it
on purpose or rounding error).
2. If there is reordering, input PTS should be shift a few frames
as DTS
From: Zhao Zhili
It's well known that mediacodec encoder requires 16x16 alignment.
Use our bsf to fix the crop info.
---
configure | 2 ++
libavcodec/mediacodecenc.c | 65 +++---
2 files changed, 63 insertions(+), 4 deletions(-)
diff --git
From: Zhao Zhili
---
When working on mediacodec encoder, I test it by making fftools/ffmpeg
into a lib, since JNI requires a JVM environment. There are three steps
mostly:
1. Rename main() function
2. Reset global variables
3. Make main() function actuall return
There is no point for this patch
From: Zhao Zhili
---
libavcodec/mediacodecenc.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c
index 693faca118..69246ad693 100644
--- a/libavcodec/mediacodecenc.c
+++ b/libavcodec/mediacodecenc.c
@@ -213,6 +213,11 @@ static
From: Zhao Zhili
Those are static const values and documented at
https://developer.android.com/reference/android/media/MediaCodecInfo.CodecProfileLevel
No runtime query is needed. Now the method can be used without JVM.
---
libavcodec/mediacodec_wrapper.c | 98
From: Zhao Zhili
---
libavcodec/mediacodecenc.c | 8 +++-
libavcodec/version.h | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c
index a4390a9df6..693faca118 100644
--- a/libavcodec/mediacodecenc.c
+++ b
From: Zhao Zhili
It's an invalid combination of Java MediaCodec with ANativeWindow.
---
libavcodec/mediacodecenc.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c
index 7cdde59945..a4390a9df6 100644
--- a/libavcodec
From: Zhao Zhili
---
libavcodec/mediacodec_wrapper.c | 38 ---
libavcodec/mediacodec_wrapper.h | 24 +++
libavcodec/mediacodecdec_common.c | 4
3 files changed, 63 insertions(+), 3 deletions(-)
diff --git a/libavcodec/mediacodec_wrapper.c b
On Sun, 2022-11-20 at 14:49 +0800, Zhao Zhili wrote:
> From: Zhao Zhili
>
>
> v2:
>
> Rebased on master.
>
> 01/12: Use crop-width/crop-height as fallback and add TODO. Co-
> authored-by: Aman Karmani
> 07/12: Fix libavcodec/version.h conflict
> 10/12: Cha
On Sat, 2022-11-19 at 16:35 -0500, Rick Kern wrote:
> objpool was only being used in fftools, but it's useful in other
> components to reduce alloation time and memory fragmentation.
>
> This patch set moves objpool to libavutil, so it can be used by
> lavc/videotoolboxenc for data being passed
From: Zhao Zhili
---
Fix commit subject ffmpeg_opt -> ffmpeg_demux
fftools/ffmpeg_demux.c | 4
1 file changed, 4 insertions(+)
diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c
index 76778d774d..d2a6d39703 100644
--- a/fftools/ffmpeg_demux.c
+++ b/fftools/ffmpeg_demu
From: Zhao Zhili
ANativeWindow can be used without JVM.
---
libavcodec/mediacodec_surface.c | 46 ---
libavcodec/mediacodec_surface.h | 8 --
libavcodec/mediacodec_wrapper.c | 30 +++-
libavcodec/mediacodec_wrapper.h | 8
From: Zhao Zhili
Signed-off-by: Zhao Zhili
---
libavutil/hwcontext_mediacodec.c | 56 +++-
libavutil/hwcontext_mediacodec.h | 11 +++
libavutil/version.h | 2 +-
3 files changed, 67 insertions(+), 2 deletions(-)
diff --git a/libavutil
From: Zhao Zhili
Signed-off-by: Zhao Zhili
---
Changelog | 1 +
libavcodec/mediacodecdec.c| 10 +-
libavcodec/mediacodecdec_common.c | 23 +++
libavcodec/mediacodecdec_common.h | 1 +
libavcodec/version.h | 4 ++--
5
From: Zhao Zhili
---
fftools/ffmpeg_demux.c | 4
1 file changed, 4 insertions(+)
diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c
index 76778d774d..d2a6d39703 100644
--- a/fftools/ffmpeg_demux.c
+++ b/fftools/ffmpeg_demux.c
@@ -625,6 +625,10 @@ static void add_input_streams
From: Zhao Zhili
Signed-off-by: Zhao Zhili
---
configure | 2 +
libavcodec/mediacodec_wrapper.c | 596 +-
libavcodec/mediacodec_wrapper.h | 8 +-
libavcodec/mediacodecdec.c| 2 +-
libavcodec/mediacodecdec_common.c | 2
From: Zhao Zhili
---
libavutil/hwcontext.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c
index ab9ad3703e..3396598269 100644
--- a/libavutil/hwcontext.c
+++ b/libavutil/hwcontext.c
@@ -397,10 +397,14 @@ int
From: Zhao Zhili
This is in preparation for NDK media codec wrapper.
Signed-off-by: Zhao Zhili
---
libavcodec/mediacodec_wrapper.c | 244 +-
libavcodec/mediacodec_wrapper.h | 255 +++-
2 files changed, 394 insertions(+), 105 deletions
From: Zhao Zhili
Signed-off-by: Zhao Zhili
---
Changelog | 1 +
configure | 4 +
libavcodec/Makefile | 2 +
libavcodec/allcodecs.c | 2 +
libavcodec/mediacodec_wrapper.c | 101 ++-
libavcodec/mediacodec_wrapper.h
From: Zhao Zhili
Since frame->buf[0] is always NULL in this case, av_buffer_unref
has no effect. If it's not NULL, double-free will happen.
Signed-off-by: Zhao Zhili
---
libavcodec/mediacodecdec_common.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/libavcodec/mediacodecdec_common.c
From: Zhao Zhili
Signed-off-by: Zhao Zhili
---
libavcodec/mediacodecdec_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/mediacodecdec_common.c
b/libavcodec/mediacodecdec_common.c
index f430cfed31..4c48b9142e 100644
--- a/libavcodec
From: Zhao Zhili
At the beginning of decoding, if we feed mediacodec too fast, the
input port will return try again. It takes some time for mediacodec
to consume bitstream and output frame. So the output port also return
try again. It possible that mediacodec_receive_frame doesn't consume
any
From: Zhao Zhili
The crop info is optional, but used unconditionally.
Co-authored-by: Aman Karmani
Signed-off-by: Zhao Zhili
---
libavcodec/mediacodecdec_common.c | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/libavcodec/mediacodecdec_common.c
b
From: Zhao Zhili
v2:
Rebased on master.
01/12: Use crop-width/crop-height as fallback and add TODO. Co-authored-by:
Aman Karmani
07/12: Fix libavcodec/version.h conflict
10/12: Change default i-frame-interval to 1 and add log message; bump minor
version
12/12: Fix rebase conflict
v1
On Sat, 2022-11-19 at 00:20 -0800, Aman Karmani wrote:
> Thank you for your work on this patchset!
>
> On Sun, Oct 23, 2022 at 8:17 PM Zhao Zhili
> wrote:
> > From: Zhao Zhili
> >
> > The crop info is optional, but used unconditionally.
>
From: Zhao Zhili
Unlike the pipe protocol, fd protocol has seek support if it
corresponding to a regular file.
---
Sometimes it's the only way to access files via file descriptor, e.g.,
requesting a shared file on Android:
https://developer.android.com/training/secure-file-sharing/request-file
the NDK MediaCodec API
> > instead.
> >
> > // Martin
> >
> > ___
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubs
ec encoder
> and NDK MediaCodec support
>
> On Thu, Nov 10, 2022 at 7:36 PM "zhilizhao(赵志立)"
> wrote:
> >
> > Ping for review.
> >
> > > On Oct 24, 2022, at 11:16, Zhao Zhili wrote:
> > >
> > > From: Zhao Zhili
> > >
&
From: Zhao Zhili
x265_sei is available since X265_BUILD 88. Bump required version
to 89 to fix the regression from commit 1f585030137, and remove a
conditional compilation.
Signed-off-by: Zhao Zhili
---
configure| 2 +-
libavcodec/libx265.c | 2 --
2 files changed, 1 insertion
From: Zhao Zhili
x265_sei is available since X265_BUILD 88. This fixes a regression
from commit 1f585030137.
Signed-off-by: Zhao Zhili
---
libavcodec/libx265.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
index 4aa96e1f2d..e36f20a812
From: Zhao Zhili
This is in preparation for NDK media codec wrapper.
Signed-off-by: Zhao Zhili
---
libavcodec/mediacodec_wrapper.c | 244 +-
libavcodec/mediacodec_wrapper.h | 255 +++-
2 files changed, 394 insertions(+), 105 deletions
From: Zhao Zhili
Signed-off-by: Zhao Zhili
---
Changelog | 1 +
libavcodec/mediacodecdec.c| 10 +-
libavcodec/mediacodecdec_common.c | 23 +++
libavcodec/mediacodecdec_common.h | 1 +
libavcodec/version.h | 2 +-
5
From: Zhao Zhili
ANativeWindow can be used without JVM.
---
libavcodec/mediacodec_surface.c | 46 ---
libavcodec/mediacodec_surface.h | 8 --
libavcodec/mediacodec_wrapper.c | 30 +++-
libavcodec/mediacodec_wrapper.h | 8
From: Zhao Zhili
Signed-off-by: Zhao Zhili
---
configure | 2 +
libavcodec/mediacodec_wrapper.c | 596 +-
libavcodec/mediacodec_wrapper.h | 8 +-
libavcodec/mediacodecdec.c| 2 +-
libavcodec/mediacodecdec_common.c | 2
From: Zhao Zhili
---
fftools/ffmpeg_opt.c | 4
1 file changed, 4 insertions(+)
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index 9245e02813..9c15858c05 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -785,6 +785,10 @@ static void add_input_streams
From: Zhao Zhili
---
libavutil/hwcontext.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c
index ab9ad3703e..3396598269 100644
--- a/libavutil/hwcontext.c
+++ b/libavutil/hwcontext.c
@@ -397,10 +397,14 @@ int
From: Zhao Zhili
Signed-off-by: Zhao Zhili
---
libavutil/hwcontext_mediacodec.c | 56 +++-
libavutil/hwcontext_mediacodec.h | 11 +++
libavutil/version.h | 4 +--
3 files changed, 68 insertions(+), 3 deletions(-)
diff --git a/libavutil
From: Zhao Zhili
Signed-off-by: Zhao Zhili
---
Changelog | 1 +
configure | 4 +
libavcodec/Makefile | 2 +
libavcodec/allcodecs.c | 2 +
libavcodec/mediacodec_wrapper.c | 102 ++-
libavcodec/mediacodec_wrapper.h
From: Zhao Zhili
Since frame->buf[0] is always NULL in this case, av_buffer_unref
has no effect. If it's not NULL, double-free will happen.
Signed-off-by: Zhao Zhili
---
libavcodec/mediacodecdec_common.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/libavcodec/mediacodecdec_common.c
From: Zhao Zhili
The crop info is optional, but used unconditionally.
Signed-off-by: Zhao Zhili
---
libavcodec/mediacodecdec_common.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/libavcodec/mediacodecdec_common.c
b/libavcodec/mediacodecdec_common.c
index 2a605e7f5b..c1cbb28488
From: Zhao Zhili
Signed-off-by: Zhao Zhili
---
libavcodec/mediacodecdec_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/mediacodecdec_common.c
b/libavcodec/mediacodecdec_common.c
index c1cbb28488..940b4e02d5 100644
--- a/libavcodec
From: Zhao Zhili
At the beginning of decoding, if we feed mediacodec too fast, the
input port will return try again. It takes some time for mediacodec
to consume bitstream and output frame. So the output port also return
try again. It possible that mediacodec_receive_frame doesn't consume
any
From: Zhao Zhili
Firstly, some bugs were fixed (patch 1-4).
Patch 5 and 6 make mediacodec_wrapper support Java MediaCodec and NDK
MediaCodec. The use case I'm considering is run FFmpeg on cmdline without JVM,
for example, run FFmpeg inside of termux (an Android terminal emulator). It's
well
From: Zhao Zhili
The crop info is optional, but used unconditionally.
Signed-off-by: Zhao Zhili
---
libavcodec/mediacodecdec_common.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/libavcodec/mediacodecdec_common.c
b/libavcodec/mediacodecdec_common.c
index 2a605e7f5b..c1cbb28488
On Tue, 2022-10-04 at 11:01 +0200, Anton Khirnov wrote:
> Quoting Zhao Zhili (2022-09-25 06:28:41)
> > From: Zhao Zhili
> >
> > ---
> > libavformat/mp3dec.c | 9 -
> > 1 file changed, 4 insertions(+), 5 deletions(-)
>
&g
On Sun, 2022-10-02 at 21:16 +0200, Marton Balint wrote:
>
> On Fri, 30 Sep 2022, Zhao Zhili wrote:
>
> > From: Zhao Zhili
> >
> > Add PCR at keyframe can be undesirable when -pcr_period is
> > specified. Add an flag to disable this behavior.
> >
> &
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
---
v2: change pcr_at_keyframe to omit_rai
doc/muxers.texi | 2 ++
libavformat/mpegtsenc.c | 6 +-
2 files changed, 7 insertions
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
> -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
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
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 solve the issue
when
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
> -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
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
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
> 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
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
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
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
> -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
On Tue, 2022-08-16 at 17:32 +0100, Derek Buitenhuis wrote:
> On 8/16/2022 5:21 PM, Zhao Zhili wrote:
> > get_frag_time() can be called with an mp4 file which has no sidx at
> > all. In that case,
> > dst_st should have a higher priority than other streams, even if
>
> -Original Message-
> From: ffmpeg-devel-boun...@ffmpeg.org On
> Behalf Of Derek Buitenhuis
> Sent: 2022年8月16日 22:49
> To: ffmpeg-devel@ffmpeg.org
> Subject: [FFmpeg-devel] [PATCH v3] mov: Compare frag times in correct time
> base when seeking a stream without a corresponding sidx
>
On Fri, 2022-08-12 at 16:22 +0100, Derek Buitenhuis wrote:
> On 8/9/2022 10:38 AM, "zhilizhao(赵志立)" wrote:
> > It’s suspicious to return a timestamp with unknown timebase.
>
> Would you suggest erroring in the case where there's no frag_stream?
> That could
> make sense.
Or just continue the
From: Zhao Zhili
Signed-off-by: Zhao Zhili
---
libavutil/hwcontext_videotoolbox.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavutil/hwcontext_videotoolbox.h
b/libavutil/hwcontext_videotoolbox.h
index b6bdcf243d..25dde85df5 100644
--- a/libavutil/hwcontext_videotoolbox.h
+++ b
From: Zhao Zhili
frag_stream_info->index_entry isn't the first sample/trun index.
cenc.frag_index_entry_base failed to catch the case since
current_index > 0.
Fix ticket #9807.
---
libavformat/isom.h | 3 ++-
libavformat/mov.c | 10 ++
2 files changed, 8 insertions(+), 5 del
From: Zhao Zhili
frag_index.current is used by cenc_filter, and is updated inside
mov_read_moof. It can out of sync regarding to mov_read_packet.
Partly fix ticket #9807.
---
libavformat/mov.c | 27 ++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git
From: Zhao Zhili
There was an implicit cast from double to int64_t in time unit of
second.
---
libavformat/flvdec.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 8dba92661b..10f0ea7736 100644
--- a/libavformat
From: Zhao Zhili
---
libavformat/flvenc.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index 1c4ffb985a..5d574fa790 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -993,12 +993,9 @@ static int
From: Zhao Zhili
Firstly, the timestamps generated from framerate are inaccurate for
variable framerate mode.
Secondly, the timestamps always start from zero, while pts/dts can
start from nonzero. FLV demuxer rejects such index with message:
"Found invalid index entries, clearing the
From: Zhao Zhili
v2:
Simplify patch 2/3 as Michael's suggestion.
Zhao Zhili (3):
avformat/flvenc: fix timestamp of key frame index
avformat/flvdec: make key frame timestamps more accurate
avformat/flvenc: fix shadowed variable ts
libavformat/flvdec.c | 13
From: Zhao Zhili
Fixes ticket #9844.
---
I don't have a camera for test. So I'm not sure if it's the only case
of memleak in ticket #9844.
libavdevice/v4l2.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 5340382d57..be422d7c8c 100644
From: Zhao Zhili
---
libavformat/flvenc.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index 1c4ffb985a..5d574fa790 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -993,12 +993,9 @@ static int
From: Zhao Zhili
Firstly, the timestamps generated from framerate are inaccurate for
variable framerate mode.
Secondly, the timestamps always start from zero, while pts/dts can
start from nonzero. FLV demuxer rejects such index with message:
"Found invalid index entries, clearing the
From: Zhao Zhili
There is an implicit cast from double to int64_t in time unit of
second.
---
libavformat/flvdec.c | 16 ++--
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index c5d3c63bd0..a78d720295 100644
From: Zhao Zhili
Streams with all zero sample_delta in 'stts' have all zero dts.
They have higher chance be chose by mov_find_next_sample(), which
leads to seek again and again.
For example, GoPro created a 'GoPro SOS' stream:
Stream #0:4[0x5](eng): Data: none (fdsc / 0x63736466), 13 kb/s
From: Zhao Zhili
Streams with all zero sample_delta in 'stts' have all zero dts.
They have higher chance be chose by mov_find_next_sample(), which
leads to seek again and again.
For example, GoPro created a 'GoPro SOS' stream:
Stream #0:4[0x5](eng): Data: none (fdsc / 0x63736466), 13 kb/s
From: Zhao Zhili
Streams with all zero sample_delta in 'stts' have all zero dts.
They have higher chance be chose by mov_find_next_sample(), which
leads to seek again and again.
For example, GoPro created a 'GoPro SOS' stream:
Stream #0:4[0x5](eng): Data: none (fdsc / 0x63736466), 13 kb/s
From: Zhao Zhili
Regression since ed0001482a74b60f3d5bc5.
Tested with:
./ffmpeg -i foo.ape -f md5 -
for samples in #9816 and #2239.
It gives the same result as before ed0001482a for ticket #9816,
and doesn't break ticket #2239.
Signed-off-by: Zhao Zhili
---
libavcodec/apedec.c | 2 +-
1
From: Zhao Zhili
Fixes ticket #9816.
Regression since ed0001482a74b60f3d5bc5.
Prediction value larger than INT32_MAX should be treated as
negative. The code already depends on undefined right shift
behavior before the patch, which doesn't get fixed by the patch.
Signed-off-by: Zhao Zhili
601 - 700 of 997 matches
Mail list logo