changeset 18711:4d87a5c4611c

When playing an audio only file use audio time instead of video time to set EDL mark. Fixes a NULL pointer dereference. Problem noticed by Robert Henney, robh A rut org.
author uau
date Wed, 14 Jun 2006 20:20:28 +0000
parents c528c6c518f1
children cb7da1894b00
files mplayer.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Wed Jun 14 19:48:54 2006 +0000
+++ b/mplayer.c	Wed Jun 14 20:20:28 2006 +0000
@@ -4232,7 +4232,8 @@
     } break;
     case MP_CMD_EDL_MARK:
       if( edl_fd ) {
-	float v = sh_video->pts;
+	float v = sh_video ? sh_video->pts :
+	    playing_audio_pts(sh_audio, d_audio, audio_out);
 	fprintf( edl_fd, "%f %f %d\n", v-2, v, 0 );
       }
       break;