aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-11-09 11:29:29 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-11-09 11:29:29 +0000
commitaf8aa846fa5b9f2c7dcde451c872426528b8b561 (patch)
treef748c187c581da6473c968f2aed009e8ecc87f19
parent3712092e76901756aa9b271a1b9ef4744b705fe4 (diff)
downloadffmpeg-af8aa846fa5b9f2c7dcde451c872426528b8b561.tar.gz
check MPV_frame_start() return value
Originally committed as revision 4682 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/h264.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index b979f36638..ea6a479bed 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -3089,11 +3089,12 @@ static int decode_init(AVCodecContext *avctx){
return 0;
}
-static void frame_start(H264Context *h){
+static int frame_start(H264Context *h){
MpegEncContext * const s = &h->s;
int i;
- MPV_frame_start(s, s->avctx);
+ if(MPV_frame_start(s, s->avctx) < 0)
+ return -1;
ff_er_frame_start(s);
assert(s->linesize && s->uvlinesize);
@@ -3115,6 +3116,7 @@ static void frame_start(H264Context *h){
s->obmc_scratchpad = av_malloc(16*s->linesize + 2*8*s->uvlinesize);
// s->decode= (s->flags&CODEC_FLAG_PSNR) || !s->encoding || s->current_picture.reference /*|| h->contains_intra*/ || 1;
+ return 0;
}
static inline void backup_mb_border(H264Context *h, uint8_t *src_y, uint8_t *src_cb, uint8_t *src_cr, int linesize, int uvlinesize){
@@ -4290,7 +4292,8 @@ static int decode_slice_header(H264Context *h){
}
if(h->slice_num == 0){
- frame_start(h);
+ if(frame_start(h) < 0)
+ return -1;
}
s->current_picture_ptr->frame_num= //FIXME frame_num cleanup