summaryrefslogtreecommitdiffstats
path: root/libhb/scan.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-08-16 14:45:11 +0000
committerjstebbins <[email protected]>2011-08-16 14:45:11 +0000
commit054ccc3e7f749bd57950eb79e3286155516f5dca (patch)
treeccb2e8ba096cec7448a8678e3615cc20b4b6a73d /libhb/scan.c
parent949c23a54d0bd40572e9e99989af6841c6d79121 (diff)
libhb: Use h.264 recovery points as key frames when decoding
Many transport streams have few or zero IDR frames. So scanning them takes a long time, generates a lot of log spam, and results in poor preview quality. Often there will be several identical preview frames because it will find the same IDR for several of the previews. Using recovery points helps all these problems. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4180 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/scan.c')
-rw-r--r--libhb/scan.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libhb/scan.c b/libhb/scan.c
index 43b4825bc..764fd001b 100644
--- a/libhb/scan.c
+++ b/libhb/scan.c
@@ -614,6 +614,9 @@ static int DecodePreviews( hb_scan_t * data, hb_title_t * title )
hb_log( "Warning: Could not read data for preview %d, skipped", i + 1 );
goto skip_preview;
}
+ int count = hb_stream_recovery_count( data->stream );
+ if ( count )
+ vidskip = count - 1;
}
else
{