[FFmpeg-devel] [PATCH] Fix target_level for EAC3.

2016-09-09 Thread Nikolas Bowe
Currently when using target_level with EAC3 it produces silence. This small patch fixes target_level for decoding EAC3. Example: ffmpeg -y -i /tmp/test.wav -acodec eac3 -dialnorm -14 -ac 6 -b:a 384000 /tmp/test.m2ts ffmpeg -y -target_level -24 -i /tmp/test.m2ts -acodec pcm_s16le -f matroska

[FFmpeg-devel] [PATCH] Fix memory leak when reading DDTS box.

2017-08-15 Thread Nikolas Bowe
--- libavformat/mov.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index 63f84be782..c02caf6719 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -889,6 +889,7 @@ static int mov_read_ddts(MOVContext *c, AVIOContext *pb, MOVAtom atom)

[FFmpeg-devel] [PATCH] Fix quadratic memory use in ff_h2645_extract_rbsp() when multiple NALUs exist in packet.

2017-10-19 Thread Nikolas Bowe
Found via fuzzing. /tmp/poc is a 1 MB mpegts file generated via fuzzing, where 1 packet has many NALUs Before this change: $ /usr/bin/time -f "\t%M Max Resident Set Size (Kb)" ./ffprobe /tmp/poc 2>&1 | tail -n 1 2158192 Max Resident Set Size (Kb) After this change: $ /usr/bin/time

[FFmpeg-devel] [PATCH] Fix leak discovered via fuzzing

2017-12-05 Thread Nikolas Bowe
--- libavcodec/extract_extradata_bsf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/extract_extradata_bsf.c b/libavcodec/extract_extradata_bsf.c index ed6509c681..d40907a675 100644 --- a/libavcodec/extract_extradata_bsf.c +++ b/libavcodec/extract_extradata_bsf.c

[FFmpeg-devel] [PATCH] Fix memory leak in lrcdec.c

2018-01-19 Thread Nikolas Bowe
--- libavformat/lrcdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/lrcdec.c b/libavformat/lrcdec.c index 12f74b22a0..f4e9a4efa9 100644 --- a/libavformat/lrcdec.c +++ b/libavformat/lrcdec.c @@ -212,6 +212,7 @@ static int lrc_read_header(AVFormatContext *s) }

[FFmpeg-devel] [PATCH] Fix signed integer overflow undefined behavior

2018-01-19 Thread Nikolas Bowe
Found via fuzzing --- libavformat/rpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rpl.c b/libavformat/rpl.c index d373600478..df449bfc29 100644 --- a/libavformat/rpl.c +++ b/libavformat/rpl.c @@ -194,7 +194,7 @@ static int rpl_read_header(AVFormatContext *s)

[FFmpeg-devel] [PATCH] Fix crash in join filter

2018-02-02 Thread Nikolas Bowe
Previously if ff_outlink_frame_wanted() returned 0 it could dereference a null pointer when trying to read nb_samples. --- libavfilter/af_join.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c index cf5131e8dc..4f86e13558 100644 ---

[FFmpeg-devel] [PATCH] avformat/flvdec: Set broken_sizes for FlixEngine.

2018-02-16 Thread Nikolas Bowe
--- libavformat/flvdec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 0217cef842..b86451fcbf 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -598,7 +598,9 @@ static int amf_parse_object(AVFormatContext *s,

[FFmpeg-devel] [PATCH] lavc/svq3: Fix regression decoding some files.

2018-07-30 Thread Nikolas Bowe
Fixes some SVQ3 encoded files which fail to decode correctly after 6d6faa2a2d. These files exhibit lots of artifacts and logs show "Media key encryption is not implemented". However they decode without artifacts before 6d6faa2a2d. The attatched patch allows these files to successfully decode, but

[FFmpeg-devel] [PATCH] Fix float-cast-overflow undefined behavior in matroskadec

2018-01-18 Thread Nikolas Bowe
--- libavformat/matroskadec.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 496499b553..cd9e1f56c2 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -2096,8 +2096,16 @@ static

[FFmpeg-devel] [PATCH] movenc: Fix VPCC bitdepth for hardware pixel formats

2019-01-31 Thread Nikolas Bowe
If a hardware encoder is used, the pixel format may be a hardware pixel format. This leads to invalid VPCC atom being written, due to depth of hardware pixel formats being 0. To work around this, fallback on bits_per_raw_sample. Signed-off-by: Nikolas Bowe --- libavcodec/vaapi_encode.c | 2

[FFmpeg-devel] [PATCH] avformat/movenc: Add more error checking when writing sample entries.

2019-02-04 Thread Nikolas Bowe
Fixes a problem where a sample entry which cannot be written correctly appears to succeed, but produces an invalid file. For example, this command: ffmpeg -f lavfi -i sine=frequency=1000:duration=5 -codec:a ac3 -movflags +empty_moov -frag_duration 500 /tmp/foo.mp4 produced a file with the

[FFmpeg-devel] [PATCH] avformat/movenc: Fix muxing EAC3 with delay_moov

2019-02-04 Thread Nikolas Bowe
When using delay_moov mov_write_moov_tag gets called multiple times. Therefore we need to keep eac3_priv around for subsequent calls. Signed-off-by: Nikolas Bowe --- libavformat/movenc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/movenc.c b/libavformat

[FFmpeg-devel] [PATCH] avformat: Fix probing on some JPEGs

2019-08-19 Thread Nikolas Bowe
Fixes "Invalid data found when processing input" on some JPEGs. Some large extensionless JPEGs can get probe score collisions. eg $ ffprobe -loglevel trace /tmp/foo [NULL @ 0x55c130ab04c0] Opening '/tmp/foo' for reading [file @ 0x55c130ab0f40] Setting default whitelist 'file,crypto' Probing

[FFmpeg-devel] [PATCH] avfilter/vf_fps: Avoid inlink fifo build up.

2019-08-28 Thread Nikolas Bowe
When duplicating frames we need to schedule for activation again, otherwise frames can build up in the inlink fifo. --- libavfilter/vf_fps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c index 6b99f20d2b..cf1e36726a 100644 ---

[FFmpeg-devel] [PATCH] avfilter/af_asetnsamples: fix sample queuing.

2019-04-05 Thread Nikolas Bowe via ffmpeg-devel
When asetnsamples uses output samples < input samples, remaining samples build up in the fifo over time. Fix this by marking the filter as ready again if there are enough samples. Regression since ef3babb2c70f564dc1634b3f29c6e35a2b2dc239 --- libavfilter/af_asetnsamples.c | 8 ++-- 1 file

[FFmpeg-devel] [PATCH] avcodec/bintext: Add error message when resolution is too small for font.

2019-04-08 Thread Nikolas Bowe via ffmpeg-devel
--- libavcodec/bintext.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/bintext.c b/libavcodec/bintext.c index d85f2c2dd4..49b75c9e27 100644 --- a/libavcodec/bintext.c +++ b/libavcodec/bintext.c @@ -93,8 +93,10 @@ static av_cold int decode_init(AVCodecContext