]> git.sesse.net Git - vlc/commitdiff
Fixed segfault when using sfilter in transocde (close #1663)
authorLaurent Aimar <fenrir@videolan.org>
Thu, 10 Jul 2008 22:14:28 +0000 (00:14 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Thu, 10 Jul 2008 22:15:32 +0000 (00:15 +0200)
modules/stream_out/transcode.c

index a1deba6dd5777f0e670b707e3ac49a173d4b44a7..eceda3bd81e10c9df0a1be2ddbbd03aa867534f1 100644 (file)
@@ -1980,7 +1980,10 @@ static int transcode_video_process( sout_stream_t *p_stream,
                 }
             }
 
-            fmt = filter_chain_GetFmtOut( id->p_f_chain )->video;
+            if( filter_chain_GetLength( id->p_f_chain ) > 0 )
+                fmt = filter_chain_GetFmtOut( id->p_f_chain )->video;
+            else
+                fmt = id->p_decoder->fmt_out.video;
 
             /* FIXME (shouldn't have to be done here) */
             fmt.i_sar_num = fmt.i_aspect * fmt.i_height / fmt.i_width;