[vlc-commits] codec: avcodec: show error string

Francois Cartegnie git at videolan.org
Wed Jan 16 10:31:38 CET 2019


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Jan 15 12:21:11 2019 +0100| [6c0e671ba5df43cfa8aa0bf6a20d39fe78aa2ad5] | committer: Francois Cartegnie

codec: avcodec: show error string

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6c0e671ba5df43cfa8aa0bf6a20d39fe78aa2ad5
---

 modules/codec/avcodec/audio.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
index c8c2c4e7d7..44cea533e7 100644
--- a/modules/codec/avcodec/audio.c
+++ b/modules/codec/avcodec/audio.c
@@ -390,7 +390,14 @@ static int DecodeBlock( decoder_t *p_dec, block_t **pp_block )
                 if( ret == AVERROR(ENOMEM) || ret == AVERROR(EINVAL) )
                     goto end;
                 else
+                {
+                    char errorstring[AV_ERROR_MAX_STRING_SIZE];
+                    const char *psz_error = av_make_error_string( errorstring,
+                                                                  AV_ERROR_MAX_STRING_SIZE, ret );
+                    if( psz_error )
+                        msg_Err( p_dec, "%s", psz_error );
                     goto drop;
+                }
             }
         }
 



More information about the vlc-commits mailing list