From 2ecbcd73d60d2f749696b39627c91e28a396538b Mon Sep 17 00:00:00 2001 From: Anton Mitrofanov Date: Fri, 11 Nov 2011 23:19:02 +0400 Subject: [PATCH] Fix crash if timecode file opening fails --- input/timecode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/input/timecode.c b/input/timecode.c index cfec6c90..143304e5 100644 --- a/input/timecode.c +++ b/input/timecode.c @@ -368,8 +368,6 @@ static int open_file( char *psz_filename, hnd_t *p_handle, video_info_t *info, c timecode_input.picture_alloc = h->input.picture_alloc; timecode_input.picture_clean = h->input.picture_clean; - *p_handle = h; - tcfile_in = fopen( psz_filename, "rb" ); FAIL_IF_ERROR( !tcfile_in, "can't open `%s'\n", psz_filename ) else if( !x264_is_regular_file( tcfile_in ) ) @@ -392,6 +390,7 @@ static int open_file( char *psz_filename, hnd_t *p_handle, video_info_t *info, c info->timebase_den = h->timebase_den; info->vfr = 1; + *p_handle = h; return 0; } -- 2.40.0