changeset 14941:d4b70c096a8e

patch by ods15: "10000l to me, I forgot that 'vfilter' could be NULL in case of framecopy, so this code always segfaulted when merging files using -ovc copy..."
author rfelker
date Sun, 13 Mar 2005 21:38:20 +0000
parents c311e35a4f3a
children 33066542018d
files mencoder.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mencoder.c	Fri Mar 11 12:37:47 2005 +0000
+++ b/mencoder.c	Sun Mar 13 21:38:20 2005 +0000
@@ -1723,6 +1723,7 @@
 } // while(!at_eof)
 
 if (!interrupted && filelist[++curfile].name != 0) {
+	if (sh_video && sh_video->vfilter) {
         // Before uniniting sh_video and the filter chain, break apart the VE.
  	vf_instance_t * ve; // this will be the filter right before the ve.
 	for (ve = sh_video->vfilter; ve->next && ve->next->next; ve = ve->next);
@@ -1730,6 +1731,7 @@
 		ve->next = NULL; // I'm telling the last filter, before the VE, there is nothing after it
 	else // There is no chain except the VE.
 		sh_video->vfilter = NULL;
+	}
 
 	if(sh_video){ uninit_video(sh_video);sh_video=NULL; }
 	if(demuxer) free_demuxer(demuxer);