[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec h264.c,1.164,1.165
Michael Niedermayer CVS
michael
Wed Nov 9 12:29:32 CET 2005
Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv11311
Modified Files:
h264.c
Log Message:
check MPV_frame_start() return value
Index: h264.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/h264.c,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -d -r1.164 -r1.165
--- h264.c 3 Nov 2005 23:26:51 -0000 1.164
+++ h264.c 9 Nov 2005 11:29:29 -0000 1.165
@@ -3089,11 +3089,12 @@
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 @@
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 @@
}
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
More information about the ffmpeg-cvslog
mailing list