]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/pcm.c
lavc/pcm: clarify error message from pcm_decode_frame()
[ffmpeg] / libavcodec / pcm.c
index c72b2003c4698657117f0d57f344c5b36c769302..826267fdb2127c95cd999f6f84f17ff62d95e591 100644 (file)
@@ -293,8 +293,10 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data,
 
     if (n && buf_size % n) {
         if (buf_size < n) {
-            av_log(avctx, AV_LOG_ERROR, "invalid PCM packet\n");
-            return -1;
+            av_log(avctx, AV_LOG_ERROR,
+                   "Invalid PCM packet, data has size %d but at least a size of %d was expected\n",
+                   buf_size, n);
+            return AVERROR_INVALIDDATA;
         } else
             buf_size -= buf_size % n;
     }