summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2015-04-20 16:59:30 +0000
committerjstebbins <[email protected]>2015-04-20 16:59:30 +0000
commitc7614bb0a263b697d31be654e29575cc7180689f (patch)
tree89ebe6d6a5e243b6dbafb3e6adc77a0ee6b4d530
parent203603f5baca70f2a372c4c834df79d693cfaca6 (diff)
scan: fix failure to find audio bitrate during scan.
git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/0.10.x@7107 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--libhb/scan.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libhb/scan.c b/libhb/scan.c
index 731b048a5..3826897a4 100644
--- a/libhb/scan.c
+++ b/libhb/scan.c
@@ -621,8 +621,9 @@ static int DecodePreviews( hb_scan_t * data, hb_title_t * title, int flush )
hb_buffer_t * vid_buf = NULL;
- int total_read = 0;
- while (total_read < PREVIEW_READ_THRESH)
+ int total_read = 0, packets = 0;
+ while (total_read < PREVIEW_READ_THRESH ||
+ (!AllAudioOK(title) && packets < 10000))
{
if (data->bd)
{
@@ -679,6 +680,7 @@ static int DecodePreviews( hb_scan_t * data, hb_title_t * title, int flush )
goto skip_preview;
}
total_read += buf->size;
+ packets++;
(hb_demux[title->demuxer])(buf, list_es, 0 );