avcodec/h264_sei/ff_h264_decode_sei: fix error codes for insufficient data
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -249,14 +249,14 @@ int ff_h264_decode_sei(H264Context *h){
|
|||||||
type=0;
|
type=0;
|
||||||
do{
|
do{
|
||||||
if (get_bits_left(&h->gb) < 8)
|
if (get_bits_left(&h->gb) < 8)
|
||||||
return -1;
|
return AVERROR_INVALIDDATA;
|
||||||
type+= show_bits(&h->gb, 8);
|
type+= show_bits(&h->gb, 8);
|
||||||
}while(get_bits(&h->gb, 8) == 255);
|
}while(get_bits(&h->gb, 8) == 255);
|
||||||
|
|
||||||
size=0;
|
size=0;
|
||||||
do{
|
do{
|
||||||
if (get_bits_left(&h->gb) < 8)
|
if (get_bits_left(&h->gb) < 8)
|
||||||
return -1;
|
return AVERROR_INVALIDDATA;
|
||||||
size+= show_bits(&h->gb, 8);
|
size+= show_bits(&h->gb, 8);
|
||||||
}while(get_bits(&h->gb, 8) == 255);
|
}while(get_bits(&h->gb, 8) == 255);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user