summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2006-05-02 21:19:32 +0000
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2006-05-02 21:19:32 +0000
commit5859b4076e5326996aa21e6fc0ce572edebec469 (patch)
tree0b5d07d04364226908bf0c003e04c45f7110775d
parent36794be8fb6bc8a837ff05703cb03c3e4e0ad47e (diff)
downloadxine-lib-5859b4076e5326996aa21e6fc0ce572edebec469.tar.gz
xine-lib-5859b4076e5326996aa21e6fc0ce572edebec469.tar.bz2
Fix a null dereference which occurs if enabling deinterlacing when
onefield_xv is selected and no frames have yet been processed. CVS patchset: 7984 CVS date: 2006/05/02 21:19:32
-rw-r--r--src/video_out/video_out_xv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c
index ec698d95c..1b093b041 100644
--- a/src/video_out/video_out_xv.c
+++ b/src/video_out/video_out_xv.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out_xv.c,v 1.215 2006/01/27 07:46:15 tmattern Exp $
+ * $Id: video_out_xv.c,v 1.216 2006/05/02 21:19:32 dsalt Exp $
*
* video_out_xv.c, X11 video extension interface for xine
*
@@ -616,7 +616,7 @@ static void xv_compute_output_size (xv_driver_t *this) {
/* onefield_xv divide by 2 the number of lines */
if (this->deinterlace_enabled
&& (this->deinterlace_method == DEINTERLACE_ONEFIELDXV)
- && (this->cur_frame->format == XINE_IMGFMT_YV12)) {
+ && this->cur_frame && (this->cur_frame->format == XINE_IMGFMT_YV12)) {
this->sc.displayed_height = this->sc.displayed_height / 2 - 1;
this->sc.displayed_yoffset = this->sc.displayed_yoffset / 2;
}