summaryrefslogtreecommitdiffstats
path: root/libhb/scan.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2012-07-06 23:12:56 +0000
committerjstebbins <[email protected]>2012-07-06 23:12:56 +0000
commit5e4a58cc2d39db9c5e8b4f5201c6bf9352412688 (patch)
treee2ba9652efa8ef449c8d9c91c58f1cb5fc83836b /libhb/scan.c
parent4ed21c1ccb42e377ec5a20cf66638b4f207515be (diff)
libhb: fix comb detection crash and decomb crash
hb_detect_comb() could crash because the dimensions of the video buffer don't have to match the dimensions returned by work object info() method if the video has segments of differeing resolutions. decomb was allocating reference buffers that were too small. This bug appears to have always existed but doesn't usually get triggered because malloc usually rounds allocation sizes up. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4812 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/scan.c')
-rw-r--r--libhb/scan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libhb/scan.c b/libhb/scan.c
index e06f14c5f..4776e08c4 100644
--- a/libhb/scan.c
+++ b/libhb/scan.c
@@ -739,7 +739,7 @@ static int DecodePreviews( hb_scan_t * data, hb_title_t * title )
}
/* Check preview for interlacing artifacts */
- if( hb_detect_comb( vid_buf, vid_info.width, vid_info.height, 10, 30, 9, 10, 30, 9 ) )
+ if( hb_detect_comb( vid_buf, 10, 30, 9, 10, 30, 9 ) )
{
hb_deep_log( 2, "Interlacing detected in preview frame %i", i+1);
interlaced_preview_count++;