[FFmpeg-devel,1/2] avcodec/mediacodecdec_common: log codec name during configure/start failures

Submitted by Aman Gupta on Sept. 5, 2019, 11:07 p.m.

Details

Message ID 20190905230720.90115-1-ffmpeg@tmm1.net
State Accepted
Commit d0e67627685607b903df310e0ee96e60ed4c4610
Headers show

Commit Message

Aman Gupta Sept. 5, 2019, 11:07 p.m.
From: Aman Gupta <aman@tmm1.net>

Signed-off-by: Aman Gupta <aman@tmm1.net>
---
 libavcodec/mediacodecdec_common.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Matthieu Bouron Sept. 6, 2019, 8:29 a.m.
On Thu, Sep 05, 2019 at 04:07:19PM -0700, Aman Gupta wrote:
> From: Aman Gupta <aman@tmm1.net>
> 
> Signed-off-by: Aman Gupta <aman@tmm1.net>
> ---
>  libavcodec/mediacodecdec_common.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/libavcodec/mediacodecdec_common.c b/libavcodec/mediacodecdec_common.c
> index ab8525fb14..d200372dd4 100644
> --- a/libavcodec/mediacodecdec_common.c
> +++ b/libavcodec/mediacodecdec_common.c
> @@ -525,8 +525,8 @@ int ff_mediacodec_dec_init(AVCodecContext *avctx, MediaCodecDecContext *s,
>      if (status < 0) {
>          char *desc = ff_AMediaFormat_toString(format);
>          av_log(avctx, AV_LOG_ERROR,
> -            "Failed to configure codec (status = %d) with format %s\n",
> -            status, desc);
> +            "Failed to configure codec %s (status = %d) with format %s\n",
> +            s->codec_name, status, desc);
>          av_freep(&desc);
>  
>          ret = AVERROR_EXTERNAL;
> @@ -537,8 +537,8 @@ int ff_mediacodec_dec_init(AVCodecContext *avctx, MediaCodecDecContext *s,
>      if (status < 0) {
>          char *desc = ff_AMediaFormat_toString(format);
>          av_log(avctx, AV_LOG_ERROR,
> -            "Failed to start codec (status = %d) with format %s\n",
> -            status, desc);
> +            "Failed to start codec %s (status = %d) with format %s\n",
> +            s->codec_name, status, desc);
>          av_freep(&desc);
>          ret = AVERROR_EXTERNAL;
>          goto fail;
> -- 
> 2.20.1
> 

LGTM.

Patch hide | download patch | download mbox

diff --git a/libavcodec/mediacodecdec_common.c b/libavcodec/mediacodecdec_common.c
index ab8525fb14..d200372dd4 100644
--- a/libavcodec/mediacodecdec_common.c
+++ b/libavcodec/mediacodecdec_common.c
@@ -525,8 +525,8 @@  int ff_mediacodec_dec_init(AVCodecContext *avctx, MediaCodecDecContext *s,
     if (status < 0) {
         char *desc = ff_AMediaFormat_toString(format);
         av_log(avctx, AV_LOG_ERROR,
-            "Failed to configure codec (status = %d) with format %s\n",
-            status, desc);
+            "Failed to configure codec %s (status = %d) with format %s\n",
+            s->codec_name, status, desc);
         av_freep(&desc);
 
         ret = AVERROR_EXTERNAL;
@@ -537,8 +537,8 @@  int ff_mediacodec_dec_init(AVCodecContext *avctx, MediaCodecDecContext *s,
     if (status < 0) {
         char *desc = ff_AMediaFormat_toString(format);
         av_log(avctx, AV_LOG_ERROR,
-            "Failed to start codec (status = %d) with format %s\n",
-            status, desc);
+            "Failed to start codec %s (status = %d) with format %s\n",
+            s->codec_name, status, desc);
         av_freep(&desc);
         ret = AVERROR_EXTERNAL;
         goto fail;