summaryrefslogtreecommitdiffstats
path: root/libhb/scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'libhb/scan.c')
-rw-r--r--libhb/scan.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libhb/scan.c b/libhb/scan.c
index 4a110c489..78a14e8ca 100644
--- a/libhb/scan.c
+++ b/libhb/scan.c
@@ -568,12 +568,21 @@ static int DecodePreviews( hb_scan_t * data, hb_title_t * title, int flush )
if (title->video_codec == WORK_NONE)
{
hb_error("No video decoder set!");
+ free(info_list);
+ crop_record_free(crops);
return 0;
}
hb_work_object_t *vid_decoder = hb_get_work(data->h, title->video_codec);
vid_decoder->codec_param = title->video_codec_param;
vid_decoder->title = title;
- vid_decoder->init( vid_decoder, NULL );
+
+ if (vid_decoder->init(vid_decoder, NULL))
+ {
+ hb_error("Decoder init failed!");
+ free(info_list);
+ crop_record_free(crops);
+ return 0;
+ }
for( i = 0; i < data->preview_count; i++ )
{