[FFmpeg-cvslog] avcodec/h264_sei/ff_h264_decode_sei: fix error codes for insufficient data

Michael Niedermayer git at videolan.org
Sun Jul 21 18:03:38 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jul 21 16:15:24 2013 +0200| [800ffa1fc0896bd0b470725545b191fea802b42d] | committer: Michael Niedermayer

avcodec/h264_sei/ff_h264_decode_sei: fix error codes for insufficient data

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/h264_sei.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/h264_sei.c b/libavcodec/h264_sei.c
index 9320852..2ac9588 100644
--- a/libavcodec/h264_sei.c
+++ b/libavcodec/h264_sei.c
@@ -249,14 +249,14 @@ int ff_h264_decode_sei(H264Context *h){
         type=0;
         do{
             if (get_bits_left(&h->gb) < 8)
-                return -1;
+                return AVERROR_INVALIDDATA;
             type+= show_bits(&h->gb, 8);
         }while(get_bits(&h->gb, 8) == 255);
 
         size=0;
         do{
             if (get_bits_left(&h->gb) < 8)
-                return -1;
+                return AVERROR_INVALIDDATA;
             size+= show_bits(&h->gb, 8);
         }while(get_bits(&h->gb, 8) == 255);
 



More information about the ffmpeg-cvslog mailing list