From e4445e9c788e15af50616a42106209a9dca60e96 Mon Sep 17 00:00:00 2001
From: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Date: Sun, 21 Mar 2010 16:34:01 +0000
Subject: [PATCH] Make g729dec.c:decode_frame() return AVERROR_INVALIDDATA
 rather than AVERROR_NOFMT in case of invalid / unknown packet size.

Originally committed as revision 22624 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 libavcodec/g729dec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/g729dec.c b/libavcodec/g729dec.c
index c1cdb5dcc40..be243606cf8 100644
--- a/libavcodec/g729dec.c
+++ b/libavcodec/g729dec.c
@@ -224,7 +224,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
         av_log(avctx, AV_LOG_DEBUG, "Packet type: %s\n", "G.729D @ 6.4kbit/s");
     } else {
         av_log(avctx, AV_LOG_ERROR, "Packet size %d is unknown.\n", buf_size);
-        return (AVERROR_NOFMT);
+        return AVERROR_INVALIDDATA;
     }
 
     for (i=0; i < buf_size; i++)
-- 
GitLab