[FFmpeg-cvslog] avcodec/ituh263dec: Use correct error codes in ff_h263_decode_mb()
Michael Niedermayer
git at videolan.org
Wed Feb 1 20:10:01 EET 2017
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Wed Feb 1 17:42:34 2017 +0100| [901c62549441532b497a5e24e2f0c268e5b034c1] | committer: Michael Niedermayer
avcodec/ituh263dec: Use correct error codes in ff_h263_decode_mb()
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=901c62549441532b497a5e24e2f0c268e5b034c1
---
libavcodec/ituh263dec.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c
index 46b9835..4a8bbf7 100644
--- a/libavcodec/ituh263dec.c
+++ b/libavcodec/ituh263dec.c
@@ -636,7 +636,7 @@ int ff_h263_decode_mb(MpegEncContext *s,
cbpc = get_vlc2(&s->gb, ff_h263_inter_MCBPC_vlc.table, INTER_MCBPC_VLC_BITS, 2);
if (cbpc < 0){
av_log(s->avctx, AV_LOG_ERROR, "cbpc damaged at %d %d\n", s->mb_x, s->mb_y);
- return -1;
+ return SLICE_ERROR;
}
}while(cbpc == 20);
@@ -670,7 +670,7 @@ int ff_h263_decode_mb(MpegEncContext *s,
mx = ff_h263_decode_motion(s, pred_x, 1);
if (mx >= 0xffff)
- return -1;
+ return SLICE_ERROR;
if (s->umvplus)
my = h263p_decode_umotion(s, pred_y);
@@ -678,7 +678,7 @@ int ff_h263_decode_mb(MpegEncContext *s,
my = ff_h263_decode_motion(s, pred_y, 1);
if (my >= 0xffff)
- return -1;
+ return SLICE_ERROR;
s->mv[0][0][0] = mx;
s->mv[0][0][1] = my;
@@ -694,14 +694,14 @@ int ff_h263_decode_mb(MpegEncContext *s,
else
mx = ff_h263_decode_motion(s, pred_x, 1);
if (mx >= 0xffff)
- return -1;
+ return SLICE_ERROR;
if (s->umvplus)
my = h263p_decode_umotion(s, pred_y);
else
my = ff_h263_decode_motion(s, pred_y, 1);
if (my >= 0xffff)
- return -1;
+ return SLICE_ERROR;
s->mv[0][i][0] = mx;
s->mv[0][i][1] = my;
if (s->umvplus && (mx - pred_x) == 1 && (my - pred_y) == 1)
@@ -727,7 +727,7 @@ int ff_h263_decode_mb(MpegEncContext *s,
mb_type= get_vlc2(&s->gb, h263_mbtype_b_vlc.table, H263_MBTYPE_B_VLC_BITS, 2);
if (mb_type < 0){
av_log(s->avctx, AV_LOG_ERROR, "b mb_type damaged at %d %d\n", s->mb_x, s->mb_y);
- return -1;
+ return SLICE_ERROR;
}
mb_type= h263_mb_type_b_map[ mb_type ];
@@ -746,7 +746,7 @@ int ff_h263_decode_mb(MpegEncContext *s,
if (cbpy < 0){
av_log(s->avctx, AV_LOG_ERROR, "b cbpy damaged at %d %d\n", s->mb_x, s->mb_y);
- return -1;
+ return SLICE_ERROR;
}
if(s->alt_inter_vlc==0 || (cbpc & 3)!=3)
@@ -779,14 +779,14 @@ int ff_h263_decode_mb(MpegEncContext *s,
else
mx = ff_h263_decode_motion(s, pred_x, 1);
if (mx >= 0xffff)
- return -1;
+ return SLICE_ERROR;
if (s->umvplus)
my = h263p_decode_umotion(s, pred_y);
else
my = ff_h263_decode_motion(s, pred_y, 1);
if (my >= 0xffff)
- return -1;
+ return SLICE_ERROR;
if (s->umvplus && (mx - pred_x) == 1 && (my - pred_y) == 1)
skip_bits1(&s->gb); /* Bit stuffing to prevent PSC */
@@ -806,14 +806,14 @@ int ff_h263_decode_mb(MpegEncContext *s,
else
mx = ff_h263_decode_motion(s, pred_x, 1);
if (mx >= 0xffff)
- return -1;
+ return SLICE_ERROR;
if (s->umvplus)
my = h263p_decode_umotion(s, pred_y);
else
my = ff_h263_decode_motion(s, pred_y, 1);
if (my >= 0xffff)
- return -1;
+ return SLICE_ERROR;
if (s->umvplus && (mx - pred_x) == 1 && (my - pred_y) == 1)
skip_bits1(&s->gb); /* Bit stuffing to prevent PSC */
@@ -831,7 +831,7 @@ int ff_h263_decode_mb(MpegEncContext *s,
cbpc = get_vlc2(&s->gb, ff_h263_intra_MCBPC_vlc.table, INTRA_MCBPC_VLC_BITS, 2);
if (cbpc < 0){
av_log(s->avctx, AV_LOG_ERROR, "I cbpc damaged at %d %d\n", s->mb_x, s->mb_y);
- return -1;
+ return SLICE_ERROR;
}
}while(cbpc == 8);
@@ -856,7 +856,7 @@ intra:
cbpy = get_vlc2(&s->gb, ff_h263_cbpy_vlc.table, CBPY_VLC_BITS, 1);
if(cbpy<0){
av_log(s->avctx, AV_LOG_ERROR, "I cbpy damaged at %d %d\n", s->mb_x, s->mb_y);
- return -1;
+ return SLICE_ERROR;
}
cbp = (cbpc & 3) | (cbpy << 2);
if (dquant) {
More information about the ffmpeg-cvslog
mailing list