[FFmpeg-cvslog] avcodec/mediacodec: reduce loglevel for per-frame logging

2018-03-06 Thread Aman Gupta
ffmpeg | branch: master | Aman Gupta  | Tue Mar  6 13:33:19 2018 
-0800| [c22e7b00e4b9359a5cfe27495d9c4b6e6f53fda2] | committer: Aman Gupta

avcodec/mediacodec: reduce loglevel for per-frame logging

Signed-off-by: Aman Gupta 
Signed-off-by: Matthieu Bouron 

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

 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 929db78361..0bd660f7c9 100644
--- a/libavcodec/mediacodecdec_common.c
+++ b/libavcodec/mediacodecdec_common.c
@@ -297,7 +297,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
 #endif
 frame->pkt_dts = AV_NOPTS_VALUE;
 
-av_log(avctx, AV_LOG_DEBUG,
+av_log(avctx, AV_LOG_TRACE,
 "Frame: width=%d stride=%d height=%d slice-height=%d "
 "crop-top=%d crop-bottom=%d crop-left=%d crop-right=%d 
encoder=%s\n"
 "destination linesizes=%d,%d,%d\n" ,

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


[FFmpeg-cvslog] avcodec/mediacodec_wrapper: blacklist more software decoders

2018-03-06 Thread Stefan _
ffmpeg | branch: master | Stefan _  | Tue Mar  6 18:00:27 2018 
+| [313b6057fbf1ccb18be3165f41f5a49e26d2bdd2] | committer: Aman Gupta

avcodec/mediacodec_wrapper: blacklist more software decoders

Additionally blacklist ffmpeg, Samsung and Qualcomm
software implementations offered through MediaCodec.

Signed-off-by: Aman Gupta 
Signed-off-by: Matthieu Bouron 

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

 libavcodec/mediacodec_wrapper.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c
index 9436b3c994..83811281a5 100644
--- a/libavcodec/mediacodec_wrapper.c
+++ b/libavcodec/mediacodec_wrapper.c
@@ -469,7 +469,12 @@ char *ff_AMediaCodecList_getCodecNameByType(const char 
*mime, int profile, int e
 goto done;
 }
 
-if (strstr(name, "OMX.google")) {
+/* Skip software decoders */
+if (
+strstr(name, "OMX.google") ||
+strstr(name, "OMX.ffmpeg") ||
+strstr(name, "OMX.SEC") ||
+!strcmp(name, "OMX.qcom.video.decoder.hevcswvdec")) {
 av_freep(&name);
 goto done_with_type;
 }

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


[FFmpeg-cvslog] MAINTAINERS: add myself to mediacodec

2018-03-06 Thread Aman Gupta
ffmpeg | branch: master | Aman Gupta  | Tue Mar  6 13:33:20 2018 
-0800| [b19e11a4dc836f4fe87d3e3c25eb5cc4f6f4b447] | committer: Aman Gupta

MAINTAINERS: add myself to mediacodec

Signed-off-by: Matthieu Bouron 

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

 MAINTAINERS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index cc4c23df6f..3c54ad6781 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -268,7 +268,7 @@ Hardware acceleration:
   crystalhd.c   Philip Langdale
   dxva2*Hendrik Leppkes, Laurent Aimar, Steve 
Lhomme
   d3d11va*  Steve Lhomme
-  mediacodec*   Matthieu Bouron
+  mediacodec*   Matthieu Bouron, Aman Gupta
   vaapi*Gwenole Beauchesne
   vaapi_encode* Mark Thompson
   vdpau*Philip Langdale, Carl Eugen Hoyos

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


[FFmpeg-cvslog] avformat/utils: simplify ff_alloc_extradata()

2018-03-06 Thread James Almer
ffmpeg | branch: master | James Almer  | Tue Mar  6 01:37:21 
2018 -0300| [2aa42fac77ac1d29d858327fc72c972672ff3729] | committer: James Almer

avformat/utils: simplify ff_alloc_extradata()

Cosmetic refactor

Reviewed-by: 74a2fa708af88d225ed708af758f236f869b1a57
Signed-off-by: James Almer 

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

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

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 31340a484b..3ca1ca2441 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3243,24 +3243,20 @@ static int tb_unreliable(AVCodecContext *c)
 
 int ff_alloc_extradata(AVCodecParameters *par, int size)
 {
-int ret;
-
 av_freep(&par->extradata);
-if (size < 0 || size >= INT32_MAX - AV_INPUT_BUFFER_PADDING_SIZE) {
-par->extradata = NULL;
-par->extradata_size = 0;
+par->extradata_size = 0;
+
+if (size < 0 || size >= INT32_MAX - AV_INPUT_BUFFER_PADDING_SIZE)
 return AVERROR(EINVAL);
-}
+
 par->extradata = av_malloc(size + AV_INPUT_BUFFER_PADDING_SIZE);
-if (par->extradata) {
-memset(par->extradata + size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
-par->extradata_size = size;
-ret = 0;
-} else {
-par->extradata_size = 0;
-ret = AVERROR(ENOMEM);
-}
-return ret;
+if (!par->extradata)
+return AVERROR(ENOMEM);
+
+memset(par->extradata + size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
+par->extradata_size = size;
+
+return 0;
 }
 
 int ff_get_extradata(AVFormatContext *s, AVCodecParameters *par, AVIOContext 
*pb, int size)

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


[FFmpeg-cvslog] avformat/utils: free existing extradata before trying to allocate a new one

2018-03-06 Thread James Almer
ffmpeg | branch: master | James Almer  | Tue Mar  6 01:19:13 
2018 -0300| [0ca33b1d4eb2a2a2e78ff3a37f1647917635b0d2] | committer: James Almer

avformat/utils: free existing extradata before trying to allocate a new one

This prevents leaks in the rare cases the function is called when extradata
already exists.

Reviewed-by: Paul B Mahol 
Signed-off-by: James Almer 

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

 libavformat/utils.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 72531d4185..31340a484b 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3245,6 +3245,7 @@ int ff_alloc_extradata(AVCodecParameters *par, int size)
 {
 int ret;
 
+av_freep(&par->extradata);
 if (size < 0 || size >= INT32_MAX - AV_INPUT_BUFFER_PADDING_SIZE) {
 par->extradata = NULL;
 par->extradata_size = 0;

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


[FFmpeg-cvslog] h264_metadata: Actually fail when sei_user_data option is invalid

2018-03-06 Thread Mark Thompson
ffmpeg | branch: master | Mark Thompson  | Tue Mar  6 23:39:00 
2018 +| [56912555bc1921420f5271159b0c20034ab4209e] | committer: Mark 
Thompson

h264_metadata: Actually fail when sei_user_data option is invalid

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

 libavcodec/h264_metadata_bsf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/h264_metadata_bsf.c b/libavcodec/h264_metadata_bsf.c
index 89bdedfc69..466823cda6 100644
--- a/libavcodec/h264_metadata_bsf.c
+++ b/libavcodec/h264_metadata_bsf.c
@@ -345,6 +345,7 @@ static int h264_metadata_filter(AVBSFContext *bsf, AVPacket 
*out)
 av_log(bsf, AV_LOG_ERROR, "Invalid user data: "
"must be \"UUID+string\".\n");
 err = AVERROR(EINVAL);
+goto fail;
 }
 }
 

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


[FFmpeg-cvslog] libavformat/tls_libtls: pass numeric hostnames to tls_connect_cbs()

2018-03-06 Thread Stefan _
ffmpeg | branch: master | Stefan _  | Wed Feb 21 17:57:00 2018 
+| [7c39305a174899cbf924ed013c89715b8bddc442] | committer: Jan Ekström

libavformat/tls_libtls: pass numeric hostnames to tls_connect_cbs()

Numeric hosts in certificates are not very common, but supported by LibreSSL.
Forward the IP address to make verification work in this case.

Fixes ticket #7029

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

 libavformat/tls_libtls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/tls_libtls.c b/libavformat/tls_libtls.c
index 1321f79229..ba83b56ffe 100644
--- a/libavformat/tls_libtls.c
+++ b/libavformat/tls_libtls.c
@@ -119,7 +119,7 @@ static int ff_tls_open(URLContext *h, const char *uri, int 
flags, AVDictionary *
 
 if (!c->listen) {
 ret = tls_connect_cbs(p->ctx, tls_read_callback, tls_write_callback,
-c->tcp, !c->numerichost ? c->host : NULL);
+c->tcp, c->host);
 } else {
 struct tls *ctx_new;
 ret = tls_accept_cbs(p->ctx, &ctx_new, tls_read_callback,

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


[FFmpeg-cvslog] mpegvideo_parser: fix indentation of an if statement

2018-03-06 Thread Masaki Tanaka
ffmpeg | branch: master | Masaki Tanaka  | Sun Feb 11 
15:40:55 2018 +0200| [8b0a9f79c8973283e7dc21609bb3848a21427906] | committer: 
Jan Ekström

mpegvideo_parser: fix indentation of an if statement

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

 libavcodec/mpegvideo_parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c
index be240b6890..7a3c7abdb2 100644
--- a/libavcodec/mpegvideo_parser.c
+++ b/libavcodec/mpegvideo_parser.c
@@ -61,7 +61,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
 if (bytes_left >= 2) {
 s->pict_type = (buf[1] >> 3) & 7;
 if (bytes_left >= 4)
-vbv_delay = ((buf[1] & 0x07) << 13) | (buf[2] << 5) | (buf[3]  
>> 3);
+vbv_delay = ((buf[1] & 0x07) << 13) | (buf[2] << 5) | 
(buf[3] >> 3);
 }
 break;
 case SEQ_START_CODE:

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


[FFmpeg-cvslog] avformat/isom: don't free extradata before calling ff_get_extradata()

2018-03-06 Thread James Almer
ffmpeg | branch: master | James Almer  | Tue Mar  6 23:26:22 
2018 -0300| [a43e9cdd442b3ccf50faa32a15b03bdaff278017] | committer: James Almer

avformat/isom: don't free extradata before calling ff_get_extradata()

ff_get_extradata() frees any existing extradata before allocating now,
and using av_free() here leaves a dangling pointer that will result in
a double free.

Fixes a regression since 0ca33b1d4eb2a2a2e78ff3a37f1647917635b0d2.

Tested-by: Michael Niedermayer 
Signed-off-by: James Almer 

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

 libavformat/isom.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/libavformat/isom.c b/libavformat/isom.c
index 59502a8b3f..2792371c25 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -526,7 +526,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
 av_log(fc, AV_LOG_TRACE, "Specific MPEG-4 header len=%d\n", len);
 if (!len || (uint64_t)len > (1<<30))
 return AVERROR_INVALIDDATA;
-av_free(st->codecpar->extradata);
 if ((ret = ff_get_extradata(fc, st->codecpar, pb, len)) < 0)
 return ret;
 if (st->codecpar->codec_id == AV_CODEC_ID_AAC) {

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