changeset 838:8561bcf928a3 trunk

[svn] - fix crash
author nenolod
date Mon, 12 Mar 2007 17:14:31 -0700
parents b56c417fbf84
children fde28d33de1c
files ChangeLog src/ffmpeg/ffmpeg.c
diffstat 2 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Mar 12 16:04:03 2007 -0700
+++ b/ChangeLog	Mon Mar 12 17:14:31 2007 -0700
@@ -1,3 +1,11 @@
+2007-03-12 23:04:03 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [1774]
+  - shorten support
+  
+  trunk/src/ffmpeg/libavformat/allformats.c |    2 ++
+  1 file changed, 2 insertions(+)
+
+
 2007-03-12 23:02:59 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
   revision [1772]
   - namespace changes
--- a/src/ffmpeg/ffmpeg.c	Mon Mar 12 16:04:03 2007 -0700
+++ b/src/ffmpeg/ffmpeg.c	Mon Mar 12 17:14:31 2007 -0700
@@ -238,6 +238,9 @@
 
     codec2 = avcodec_find_decoder(c2->codec_id);
 
+    if(!codec2)
+	return 0;
+
     return 1;
 }
 
@@ -281,7 +284,7 @@
     AVFormatContext *in = NULL;
     gchar *filename_proxy = g_strdup(filename);
 
-    if(av_open_input_file(&ic2, str_twenty_to_space(filename), NULL, 0, NULL) < 0)
+    if(av_open_input_file(&in, str_twenty_to_space(filename), NULL, 0, NULL) < 0)
 	return NULL;
 
     tuple = bmp_title_input_new();
@@ -289,7 +292,7 @@
     tuple->file_name = g_path_get_basename(filename_proxy);
     tuple->file_path = g_path_get_dirname(filename_proxy);
     tuple->file_ext = extname(filename_proxy);
-	
+
     av_find_stream_info(in);
 
     if((in->title[0] != '\0') || (in->author[0] != '\0') || (in->album[0] != '\0') ||