From: <rb...@fr...> - 2005-02-01 21:15:33
|
CVS Root: /cvs/gstreamer Module: gst-ffmpeg Changes by: rbultje Date: Tue Feb 01 2005 13:15:32 PST Log message: * ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_frame): Don´t SIGFPE right away. Modified files: . : ChangeLog ext/ffmpeg : gstffmpegdec.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-ffmpeg/ChangeLog.diff?r1=1.132&r2=1.133 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-ffmpeg/ext/ffmpeg/gstffmpegdec.c.diff?r1=1.89&r2=1.90 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-ffmpeg/ChangeLog,v retrieving revision 1.132 retrieving revision 1.133 diff -u -d -r1.132 -r1.133 --- ChangeLog 31 Jan 2005 10:45:20 -0000 1.132 +++ ChangeLog 1 Feb 2005 21:15:20 -0000 1.133 @@ -1,3 +1,18 @@ +2005-02-01 Ronald S. Bultje <rb...@ro...> + + * ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_frame): + Don´t SIGFPE right away. + reviewed by: <delete if not using a buddy> + * ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_lowres_get_type), + (gst_ffmpegdec_skipframe_get_type), (gst_ffmpegdec_class_init), + (gst_ffmpegdec_init), (gst_ffmpegdec_connect), + (gst_ffmpegdec_frame), (gst_ffmpegdec_set_property), + (gst_ffmpegdec_get_property): 2005-01-31 Ronald S. Bultje <rb...@ro...> * ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_lowres_get_type), Index: gstffmpegdec.c RCS file: /cvs/gstreamer/gst-ffmpeg/ext/ffmpeg/gstffmpegdec.c,v retrieving revision 1.89 retrieving revision 1.90 diff -u -d -r1.89 -r1.90 --- gstffmpegdec.c 31 Jan 2005 10:45:20 -0000 1.89 +++ gstffmpegdec.c 1 Feb 2005 21:15:20 -0000 1.90 @@ -660,26 +660,35 @@ * For B-frame containing movies, we get all pictures delayed * except for the I frames, so we synchronize only on I frames * and keep an internal counter based on FPS for the others. */ - if (ffmpegdec->picture->pict_type == FF_I_TYPE && - GST_CLOCK_TIME_IS_VALID (*in_ts) && - ffmpegdec->context->frame_rate > 0) { + if ((ffmpegdec->picture->pict_type == FF_I_TYPE || + !GST_CLOCK_TIME_IS_VALID (ffmpegdec->next_ts)) && + GST_CLOCK_TIME_IS_VALID (*in_ts)) { ffmpegdec->next_ts = *in_ts; } GST_BUFFER_TIMESTAMP (outbuf) = ffmpegdec->next_ts; - GST_BUFFER_DURATION (outbuf) = GST_SECOND * - ffmpegdec->context->frame_rate_base / - ffmpegdec->context->frame_rate; - ffmpegdec->next_ts += GST_BUFFER_DURATION (outbuf); + if (ffmpegdec->context->frame_rate_base != 0 && + ffmpegdec->context->frame_rate != 0) { + GST_BUFFER_DURATION (outbuf) = GST_SECOND * + ffmpegdec->context->frame_rate_base / + ffmpegdec->context->frame_rate; + ffmpegdec->next_ts += GST_BUFFER_DURATION (outbuf); + } else { + ffmpegdec->next_ts = GST_CLOCK_TIME_NONE; + } } else if (ffmpegdec->picture->pict_type != -1) { /* update time for skip-frame */ - } else { ffmpegdec->next_ts += GST_SECOND * ffmpegdec->context->frame_rate_base / ffmpegdec->context->frame_rate; } break; |