[FFmpeg-cvslog] MAINTAINERS: add myself to libavfilter/dnn

2019-12-03 Thread Guo , Yejun
ffmpeg | branch: master | Guo, Yejun  | Sat Nov 30 
12:24:58 2019 +0800| [b864af033d41e1628ea02424b5979eaeac51b743] | committer: 
Michael Niedermayer

MAINTAINERS: add myself to libavfilter/dnn

Signed-off-by: Guo, Yejun 
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b864af033d41e1628ea02424b5979eaeac51b743
---

 MAINTAINERS | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 7f60ef0021..5d025201d5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -369,6 +369,8 @@ Filters:
 Sources:
   vsrc_mandelbrot.c Michael Niedermayer
 
+dnn Yejun Guo
+
 libavformat
 ===
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] libavformat/utils: Fix code indentation

2019-12-03 Thread Linjie Fu
ffmpeg | branch: master | Linjie Fu  | Mon Dec  2 09:53:47 
2019 +0800| [8fc8bdddbf7355ea206fad0c66a42eba6a2904bb] | committer: Michael 
Niedermayer

libavformat/utils: Fix code indentation

Introduced since 077939626eeaa0c1364065414c18ab9b3a072281.

Signed-off-by: Linjie Fu 
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8fc8bdddbf7355ea206fad0c66a42eba6a2904bb
---

 libavformat/utils.c | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 8196442dd1..4d18880acb 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3776,18 +3776,18 @@ FF_ENABLE_DEPRECATION_WARNINGS
 }
 analyzed_all_streams = 0;
 if (!missing_streams || !*missing_streams)
-if (i == ic->nb_streams) {
-analyzed_all_streams = 1;
-/* NOTE: If the format has no header, then we need to read some
- * packets to get most of the streams, so we cannot stop here. */
-if (!(ic->ctx_flags & AVFMTCTX_NOHEADER)) {
-/* If we found the info for all the codecs, we can stop. */
-ret = count;
-av_log(ic, AV_LOG_DEBUG, "All info found\n");
-flush_codecs = 0;
-break;
+if (i == ic->nb_streams) {
+analyzed_all_streams = 1;
+/* NOTE: If the format has no header, then we need to read some
+ * packets to get most of the streams, so we cannot stop here. 
*/
+if (!(ic->ctx_flags & AVFMTCTX_NOHEADER)) {
+/* If we found the info for all the codecs, we can stop. */
+ret = count;
+av_log(ic, AV_LOG_DEBUG, "All info found\n");
+flush_codecs = 0;
+break;
+}
 }
-}
 /* We did not get all the codec info, but we read too much data. */
 if (read_size >= probesize) {
 ret = count;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avfilter/vf_unsharp: Don't dereference NULL

2019-12-03 Thread Andreas Rheinhardt
ffmpeg | branch: master | Andreas Rheinhardt  | 
Sun Dec  1 10:56:26 2019 +0100| [710ab136931ff228b355d87512b0d4ca4e94656a] | 
committer: Michael Niedermayer

avfilter/vf_unsharp: Don't dereference NULL

The unsharp filter uses an array of arrays of uint32_t, each of which is
separately allocated. These arrays also need to freed separately; but
before doing so, one needs to check whether the array of arrays has
actually been allocated, otherwise one would dereference a NULL pointer.
This fixes #8408.

Furthermore, the array of arrays needs to be zero-initialized so that
no uninitialized pointer will be freed in case an allocation of one of
the individual arrays fails.

Signed-off-by: Andreas Rheinhardt 
Reviewed-by: Paul B Mahol 
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=710ab136931ff228b355d87512b0d4ca4e94656a
---

 libavfilter/vf_unsharp.c | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/libavfilter/vf_unsharp.c b/libavfilter/vf_unsharp.c
index 95b4968d41..7b430b650d 100644
--- a/libavfilter/vf_unsharp.c
+++ b/libavfilter/vf_unsharp.c
@@ -218,7 +218,7 @@ static int init_filter_param(AVFilterContext *ctx, 
UnsharpFilterParam *fp, const
effect, effect_type, fp->msize_x, fp->msize_y, fp->amount / 
65535.0);
 
 fp->sr = av_malloc_array((MAX_MATRIX_SIZE - 1) * s->nb_threads, 
sizeof(uint32_t));
-fp->sc = av_malloc_array(2 * fp->steps_y * s->nb_threads, sizeof(uint32_t 
**));
+fp->sc = av_mallocz_array(2 * fp->steps_y * s->nb_threads, sizeof(uint32_t 
*));
 if (!fp->sr || !fp->sc)
 return AVERROR(ENOMEM);
 
@@ -258,9 +258,11 @@ static void free_filter_param(UnsharpFilterParam *fp, int 
nb_threads)
 {
 int z;
 
-for (z = 0; z < 2 * fp->steps_y * nb_threads; z++)
-av_freep(>sc[z]);
-av_freep(>sc);
+if (fp->sc) {
+for (z = 0; z < 2 * fp->steps_y * nb_threads; z++)
+av_freep(>sc[z]);
+av_freep(>sc);
+}
 av_freep(>sr);
 }
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avformat/mpegtsenc: allow any sensible PID for elementary and PMT PIDs

2019-12-03 Thread Marton Balint
ffmpeg | branch: master | Marton Balint  | Mon Nov 11 22:49:15 
2019 +0100| [f5b83d5419a3610f2dedd3f7b82f4a0e84d5a58b] | committer: Marton 
Balint

avformat/mpegtsenc: allow any sensible PID for elementary and PMT PIDs

This sets the range of the first automatically assigned PMT PID or elementary
stream PID parameters to [0x20, 0x1ffa]. You can still assign manually a PID
for a stream using AVStream->id in the wider [0x10, 0x1ffe] range as specified
by ISO13818-1. But since DVB and ATSC both reserves some PIDs, let's not allow
them to be automatically assigned.

Also make sure that assigned PID numbers are valid and fix the error message
for the previous PID collision checks.

Signed-off-by: Marton Balint 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f5b83d5419a3610f2dedd3f7b82f4a0e84d5a58b
---

 doc/muxers.texi |  7 ---
 libavformat/mpegts.h|  2 ++
 libavformat/mpegtsenc.c | 17 -
 libavformat/version.h   |  2 +-
 4 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 09ded7d48a..5d7ff1ab3b 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -1582,11 +1582,12 @@ Advanced Codec Digital HDTV service.
 @end table
 
 @item mpegts_pmt_start_pid @var{integer}
-Set the first PID for PMT. Default is @code{0x1000}. Max is @code{0x1f00}.
+Set the first PID for PMTs. Default is @code{0x1000}, minimum is @code{0x0020},
+maximum is @code{0x1ffa}.
 
 @item mpegts_start_pid @var{integer}
-Set the first PID for data packets. Default is @code{0x0100}. Max is
-@code{0x0f00}.
+Set the first PID for elementary streams. Default is @code{0x0100}, minimum is
+@code{0x0020}, maximum is @code{0x1ffa}.
 
 @item mpegts_m2ts_mode @var{boolean}
 Enable m2ts mode if set to @code{1}. Default value is @code{-1} which
diff --git a/libavformat/mpegts.h b/libavformat/mpegts.h
index ecc3d3374c..86a3eba4e2 100644
--- a/libavformat/mpegts.h
+++ b/libavformat/mpegts.h
@@ -58,6 +58,8 @@
 #define SIT_PID 0x001F /* Selection Information Table */
 /* PID from 0x0020 to 0x1FFA may be assigned as needed to PMT, elementary
  * streams and other data tables */
+#define FIRST_OTHER_PID 0x0020
+#define  LAST_OTHER_PID 0x1FFA
 /* PID 0x1FFB is used by DigiCipher 2/ATSC MGT metadata */
 /* PID from 0x1FFC to 0x1FFE may be assigned as needed to PMT, elementary
  * streams and other data tables */
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 9f8f1715c9..b578539240 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -914,17 +914,24 @@ static int mpegts_init(AVFormatContext *s)
  * this range are assigned a calculated pid. */
 if (st->id < 16) {
 ts_st->pid = ts->start_pid + i;
-} else if (st->id < 0x1FFF) {
-ts_st->pid = st->id;
 } else {
+ts_st->pid = st->id;
+}
+if (ts_st->pid >= 0x1FFF) {
 av_log(s, AV_LOG_ERROR,
"Invalid stream id %d, must be less than 8191\n", st->id);
 ret = AVERROR(EINVAL);
 goto fail;
 }
 for (j = 0; j < ts->nb_services; j++) {
+if (ts->services[j]->pmt.pid > LAST_OTHER_PID) {
+av_log(s, AV_LOG_ERROR,
+   "Invalid PMT PID %d, must be less than %d\n", 
ts->services[j]->pmt.pid, LAST_OTHER_PID + 1);
+ret = AVERROR(EINVAL);
+goto fail;
+}
 if (ts_st->pid == ts->services[j]->pmt.pid) {
-av_log(s, AV_LOG_ERROR, "Duplicate stream id %d\n", 
ts_st->pid);
+av_log(s, AV_LOG_ERROR, "PID %d cannot be both elementary and 
PMT PID\n", ts_st->pid);
 ret = AVERROR(EINVAL);
 goto fail;
 }
@@ -1888,10 +1895,10 @@ static const AVOption options[] = {
   AV_OPT_FLAG_ENCODING_PARAM, "mpegts_service_type" },
 { "mpegts_pmt_start_pid", "Set the first pid of the PMT.",
   offsetof(MpegTSWrite, pmt_start_pid), AV_OPT_TYPE_INT,
-  { .i64 = 0x1000 }, 0x0010, 0x1f00, AV_OPT_FLAG_ENCODING_PARAM },
+  { .i64 = 0x1000 }, FIRST_OTHER_PID, LAST_OTHER_PID, 
AV_OPT_FLAG_ENCODING_PARAM },
 { "mpegts_start_pid", "Set the first pid.",
   offsetof(MpegTSWrite, start_pid), AV_OPT_TYPE_INT,
-  { .i64 = 0x0100 }, 0x0010, 0x0f00, AV_OPT_FLAG_ENCODING_PARAM },
+  { .i64 = 0x0100 }, FIRST_OTHER_PID, LAST_OTHER_PID, 
AV_OPT_FLAG_ENCODING_PARAM },
 { "mpegts_m2ts_mode", "Enable m2ts mode.",
   offsetof(MpegTSWrite, m2ts_mode), AV_OPT_TYPE_BOOL,
   { .i64 = -1 }, -1, 1, AV_OPT_FLAG_ENCODING_PARAM },
diff --git a/libavformat/version.h b/libavformat/version.h
index bac54aed9d..213b66b45f 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -33,7 +33,7 @@
 // Also please add any ticket numbers that you believe might be affected here
 #define LIBAVFORMAT_VERSION_MAJOR  58
 #define LIBAVFORMAT_VERSION_MINOR  35
-#define LIBAVFORMAT_VERSION_MICRO 100

[FFmpeg-cvslog] avformat/mpegtsenc: add padding to m2ts streams

2019-12-03 Thread Marton Balint
ffmpeg | branch: master | Marton Balint  | Sun Nov 10 23:34:17 
2019 +0100| [1e0ea369456b93dcf6d2ecc2bce45e1b33c2baca] | committer: Marton 
Balint

avformat/mpegtsenc: add padding to m2ts streams

6144 byte alignment is needed.

Signed-off-by: Marton Balint 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1e0ea369456b93dcf6d2ecc2bce45e1b33c2baca
---

 libavformat/mpegtsenc.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 98e91ebf89..e8dd8b7d56 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -1774,6 +1774,7 @@ static int mpegts_write_packet_internal(AVFormatContext 
*s, AVPacket *pkt)
 
 static void mpegts_write_flush(AVFormatContext *s)
 {
+MpegTSWrite *ts = s->priv_data;
 int i;
 
 /* flush current packets */
@@ -1788,6 +1789,12 @@ static void mpegts_write_flush(AVFormatContext *s)
 ts_st->opus_queued_samples = 0;
 }
 }
+
+if (ts->m2ts_mode) {
+int packets = (avio_tell(s->pb) / (TS_PACKET_SIZE + 4)) % 32;
+while (packets++ < 32)
+mpegts_insert_null_packet(s);
+}
 }
 
 static int mpegts_write_packet(AVFormatContext *s, AVPacket *pkt)

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avformat/mpegtsenc: factorize writing packet

2019-12-03 Thread Marton Balint
ffmpeg | branch: master | Marton Balint  | Sun Nov 10 22:51:33 
2019 +0100| [998906a0a40872a43bf7c601b4269f8cb0145424] | committer: Marton 
Balint

avformat/mpegtsenc: factorize writing packet

Signed-off-by: Marton Balint 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=998906a0a40872a43bf7c601b4269f8cb0145424
---

 libavformat/mpegtsenc.c | 15 ++-
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index b9768803c0..98e91ebf89 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -719,7 +719,7 @@ static int64_t get_pcr(const MpegTSWrite *ts, AVIOContext 
*pb)
ts->first_pcr;
 }
 
-static void mpegts_prefix_m2ts_header(AVFormatContext *s)
+static void write_packet(AVFormatContext *s, const uint8_t *packet)
 {
 MpegTSWrite *ts = s->priv_data;
 if (ts->m2ts_mode) {
@@ -729,13 +729,13 @@ static void mpegts_prefix_m2ts_header(AVFormatContext *s)
 avio_write(s->pb, (unsigned char *) _extra_header,
sizeof(tp_extra_header));
 }
+avio_write(s->pb, packet, TS_PACKET_SIZE);
 }
 
 static void section_write_packet(MpegTSSection *s, const uint8_t *packet)
 {
 AVFormatContext *ctx = s->opaque;
-mpegts_prefix_m2ts_header(ctx);
-avio_write(ctx->pb, packet, TS_PACKET_SIZE);
+write_packet(ctx, packet);
 }
 
 static MpegTSService *mpegts_add_service(AVFormatContext *s, int sid,
@@ -1068,8 +1068,7 @@ static void mpegts_insert_null_packet(AVFormatContext *s)
 *q++ = 0xff;
 *q++ = 0x10;
 memset(q, 0x0FF, TS_PACKET_SIZE - (q - buf));
-mpegts_prefix_m2ts_header(s);
-avio_write(s->pb, buf, TS_PACKET_SIZE);
+write_packet(s, buf);
 }
 
 /* Write a single transport stream packet with a PCR and no payload */
@@ -1098,8 +1097,7 @@ static void mpegts_insert_pcr_only(AVFormatContext *s, 
AVStream *st)
 
 /* stuffing bytes */
 memset(q, 0xFF, TS_PACKET_SIZE - (q - buf));
-mpegts_prefix_m2ts_header(s);
-avio_write(s->pb, buf, TS_PACKET_SIZE);
+write_packet(s, buf);
 }
 
 static void write_pts(uint8_t *q, int fourbits, int64_t pts)
@@ -1441,8 +1439,7 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream 
*st,
 
 payload  += len;
 payload_size -= len;
-mpegts_prefix_m2ts_header(s);
-avio_write(s->pb, buf, TS_PACKET_SIZE);
+write_packet(s, buf);
 }
 ts_st->prev_payload_key = key;
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avformat/mpegtsenc: move around setting m2ts_mode

2019-12-03 Thread Marton Balint
ffmpeg | branch: master | Marton Balint  | Sun Nov 10 22:14:30 
2019 +0100| [db63db3977bb49c8d8f389b31db96253fa9e9a46] | committer: Marton 
Balint

avformat/mpegtsenc: move around setting m2ts_mode

Signed-off-by: Marton Balint 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=db63db3977bb49c8d8f389b31db96253fa9e9a46
---

 libavformat/mpegtsenc.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 92c7820236..b9768803c0 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -850,6 +850,14 @@ static int mpegts_init(AVFormatContext *s)
 int *pids;
 int ret;
 
+if (ts->m2ts_mode == -1) {
+if (av_match_ext(s->url, "m2ts")) {
+ts->m2ts_mode = 1;
+} else {
+ts->m2ts_mode = 0;
+}
+}
+
 if (s->max_delay < 0) /* Not set by the caller */
 s->max_delay = 0;
 
@@ -1002,14 +1010,6 @@ static int mpegts_init(AVFormatContext *s)
av_rescale(ts->sdt_period, 1000, PCR_TIME_BASE),
av_rescale(ts->pat_period, 1000, PCR_TIME_BASE));
 
-if (ts->m2ts_mode == -1) {
-if (av_match_ext(s->url, "m2ts")) {
-ts->m2ts_mode = 1;
-} else {
-ts->m2ts_mode = 0;
-}
-}
-
 return 0;
 
 fail:

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avformat/mpegtsenc: set priority flag for AC3 codecs if writing BluRay

2019-12-03 Thread Marton Balint
ffmpeg | branch: master | Marton Balint  | Sun Nov 10 22:12:28 
2019 +0100| [565dc3e451c73a011e37a5faf022f67b8b5c1f9c] | committer: Marton 
Balint

avformat/mpegtsenc: set priority flag for AC3 codecs if writing BluRay

Signed-off-by: Marton Balint 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=565dc3e451c73a011e37a5faf022f67b8b5c1f9c
---

 libavformat/mpegtsenc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index b578539240..92c7820236 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -1237,6 +1237,8 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream 
*st,
 q= buf;
 *q++ = 0x47;
 val  = ts_st->pid >> 8;
+if (ts->m2ts_mode && st->codecpar->codec_id == AV_CODEC_ID_AC3)
+val |= 0x20;
 if (is_start)
 val |= 0x40;
 *q++  = val;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] tools/target_dec_fuzzer: Support fuzzing error detection

2019-12-03 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat 
Nov 30 00:59:20 2019 +0100| [3ae87bb3c1cb5bbf5c237874efcce47b82e49d6b] | 
committer: Michael Niedermayer

tools/target_dec_fuzzer: Support fuzzing error detection

This should increase coverage

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3ae87bb3c1cb5bbf5c237874efcce47b82e49d6b
---

 tools/target_dec_fuzzer.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c
index 1c4fb11b8a..9dbe025db9 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -194,6 +194,12 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t 
size) {
 parser = av_parser_init(c->id);
 if (flags & 2)
 ctx->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL;
+if (flags & 4) {
+ctx->err_recognition = AV_EF_AGGRESSIVE | AV_EF_COMPLIANT | 
AV_EF_CAREFUL;
+if (flags & 8)
+ctx->err_recognition |= AV_EF_EXPLODE;
+}
+
 
 extradata_size = bytestream2_get_le32();
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] tools/target_dec_fuzzer: Support setting AV_CODEC_FLAG2_FAST

2019-12-03 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat 
Nov 30 00:59:21 2019 +0100| [5ac8675cb1a4ecb068db9a938e2b371b8792c3f9] | 
committer: Michael Niedermayer

tools/target_dec_fuzzer: Support setting AV_CODEC_FLAG2_FAST

This should improve coverage

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5ac8675cb1a4ecb068db9a938e2b371b8792c3f9
---

 tools/target_dec_fuzzer.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c
index 9dbe025db9..dcf47b0f4d 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -199,6 +199,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t 
size) {
 if (flags & 8)
 ctx->err_recognition |= AV_EF_EXPLODE;
 }
+if (flags & 0x10)
+ctx->flags2 |= AV_CODEC_FLAG2_FAST;
 
 
 extradata_size = bytestream2_get_le32();

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avdevice/xcbgrab: Handle reply and error properly

2019-12-03 Thread Kusanagi Kouichi
ffmpeg | branch: master | Kusanagi Kouichi  | Tue Nov 19 
22:59:30 2019 +0900| [12bbfc4ccaa150e06895691049fa2ea33385d210] | committer: 
Marton Balint

avdevice/xcbgrab: Handle reply and error properly

Fix a NULL dereference and leaks.

Signed-off-by: Kusanagi Kouichi 
Signed-off-by: Marton Balint 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=12bbfc4ccaa150e06895691049fa2ea33385d210
---

 libavdevice/xcbgrab.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/libavdevice/xcbgrab.c b/libavdevice/xcbgrab.c
index b7e689343e..063fecf838 100644
--- a/libavdevice/xcbgrab.c
+++ b/libavdevice/xcbgrab.c
@@ -168,6 +168,7 @@ static int xcbgrab_frame(AVFormatContext *s, AVPacket *pkt)
"sequence:%u resource_id:%u minor_code:%u major_code:%u.\n",
e->response_type, e->error_code,
e->sequence, e->resource_id, e->minor_code, e->major_code);
+free(e);
 return AVERROR(EACCES);
 }
 
@@ -276,6 +277,7 @@ static int xcbgrab_frame_shm(AVFormatContext *s, AVPacket 
*pkt)
e->response_type, e->error_code,
e->sequence, e->resource_id, e->minor_code, e->major_code);
 
+free(e);
 return AVERROR(EACCES);
 }
 
@@ -537,6 +539,8 @@ static int create_stream(AVFormatContext *s)
 
 gc  = xcb_get_geometry(c->conn, c->screen->root);
 geo = xcb_get_geometry_reply(c->conn, gc, NULL);
+if (!geo)
+return AVERROR_EXTERNAL;
 
 if (c->x + c->width > geo->width ||
 c->y + c->height > geo->height) {
@@ -546,6 +550,7 @@ static int create_stream(AVFormatContext *s)
c->width, c->height,
c->x, c->y,
geo->width, geo->height);
+free(geo);
 return AVERROR(EINVAL);
 }
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".