avcodec/h264_sei/ff_h264_decode_sei: fix error codes for insufficient data
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 21 Jul 2013 14:15:24 +0000 (16:15 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 21 Jul 2013 15:57:15 +0000 (17:57 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/h264_sei.c

index 9320852..2ac9588 100644 (file)
@@ -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);