Prevent the same CC buffer from being attached to multiple tags. The
same buffer would get pushed to a fifo multiple times and ultimately
freed multiple times.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4345
b64f7644-9d1e-0410-96f1-
a4d463321fa5
static void next_tag( hb_libmpeg2_t *m, hb_buffer_t *buf_es )
{
+ if( m->tags[m->cur_tag].cc_buf == m->last_cc1_buf )
+ m->last_cc1_buf = NULL;
+
m->cur_tag = ( m->cur_tag + 1 ) & (NTAGS-1);
if ( m->tags[m->cur_tag].start >= 0 || m->tags[m->cur_tag].cc_buf )
{