OSDN Git Service

fix lockup in reader when importing srt's
authorjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Fri, 13 Nov 2009 19:40:58 +0000 (19:40 +0000)
committerjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Fri, 13 Nov 2009 19:40:58 +0000 (19:40 +0000)
The subitle id for srt's was not being set.  This caused the reader to
mistakenly select the subtitle's fifo when processing audio data and
stuff audio into it, filling it very rapidly. Sync would not
remove items from the subtitle fifo because the corresponding video timestamp
hadn't arrived yet.  And since reader was waiting on a full subtitle fifo,
no more video would ever arive at sync.

git-svn-id: svn://localhost/HandBrake/trunk@2926 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/common.c

index 1da836e..52ea27f 100644 (file)
@@ -880,6 +880,7 @@ int hb_srt_add( const hb_job_t * job,
 
     subtitle = calloc( 1, sizeof( *subtitle ) );
     
+    subtitle->id = (hb_list_count(job->list_subtitle) << 8) | 0xFF;
     subtitle->format = TEXTSUB;
     subtitle->source = SRTSUB;