<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:11px">Hi,</span><div style="font-family:arial,sans-serif;font-size:11px"><br></div><div style="font-family:arial,sans-serif;font-size:11px">I noticed that Handbrake patches libbluray with the patch below, and it applies cleanly. A candidate for inclusion? I must admit I have no idea what it does.</div>
<div style="font-family:arial,sans-serif;font-size:11px"><br></div><div style="font-family:arial,sans-serif;font-size:11px">Cheers,</div><div style="font-family:arial,sans-serif;font-size:11px"><br></div><div style="font-family:arial,sans-serif;font-size:11px">
Wout.</div><div style="font-family:arial,sans-serif;font-size:11px"><br></div><div style="font-family:arial,sans-serif;font-size:11px"><div>diff --git a/src/libbluray/bdnav/navigation.c b/src/libbluray/bdnav/navigation.c</div>
<div>index c8dc307..26d0000 100644</div><div>--- a/src/libbluray/bdnav/navigation.c</div><div>+++ b/src/libbluray/bdnav/navigation.c</div><div>@@ -32,9 +32,25 @@</div><div> #include <stdlib.h></div><div> #include <string.h></div>
<div> </div><div>+static int _stream_cmp(MPLS_STREAM *a, MPLS_STREAM *b)</div><div>+{</div><div>+ if (a->stream_type == b->stream_type &&</div><div>+ a->coding_type == b->coding_type &&</div>
<div>+ a->pid == b->pid &&</div><div>+ a->subpath_id == b->subpath_id &&</div><div>+ a->subclip_id == b->subclip_id &&</div><div>+ a->format == b->format &&</div>
<div>+ a->rate == b->rate &&</div><div>+ a->char_code == b->char_code &&</div><div>+ memcmp(a->lang, b->lang, 4) == 0) {</div><div>+ return 1;</div>
<div>+ }</div><div>+ return 0;</div><div>+}</div><div>+</div><div> static int _filter_dup(MPLS_PL *pl_list[], unsigned count, MPLS_PL *pl)</div><div> {</div><div>- unsigned ii, jj;</div><div>+ unsigned ii, jj, kk;</div>
<div> </div><div> for (ii = 0; ii < count; ii++) {</div><div> if (pl->list_count != pl_list[ii]->list_count) {</div><div>@@ -54,7 +70,48 @@ static int _filter_dup(MPLS_PL *pl_list[], unsigned count, MPLS_PL *pl)</div>
<div> pi1->out_time != pi2->out_time) {</div><div> break;</div><div> }</div><div>+ if (pi1->stn.num_video != pi2->stn.num_video ||</div>
<div>+ pi1->stn.num_audio != pi2->stn.num_audio ||</div><div>+ pi1->stn.num_pg != pi2->stn.num_pg || </div><div>+ pi1->stn.num_ig != pi2->stn.num_ig ||</div>
<div>+ pi1->stn.num_secondary_audio != pi2->stn.num_secondary_audio ||</div><div>+ pi1->stn.num_secondary_video != pi2->stn.num_secondary_video) {</div><div>+ break;</div>
<div>+ }</div><div>+ for (kk = 0; kk < pi1->stn.num_video; kk++) {</div><div>+ if (!_stream_cmp(&pi1->stn.video[kk], &pi2->stn.video[kk])) {</div><div>+ goto next;</div>
<div>+ }</div><div>+ }</div><div>+ for (kk = 0; kk < pi1->stn.num_audio; kk++) {</div><div>+ if (!_stream_cmp(&pi1->stn.audio[kk], &pi2->stn.audio[kk])) {</div>
<div>+ goto next;</div><div>+ }</div><div>+ }</div><div>+ for (kk = 0; kk < pi1->stn.num_pg; kk++) {</div><div>+ if (!_stream_cmp(&pi1-><a href="http://stn.pg/" target="_blank">stn.pg</a>[kk], &pi2-><a href="http://stn.pg/" target="_blank">stn.pg</a>[kk])) {</div>
<div>+ goto next;</div><div>+ }</div><div>+ }</div><div>+ for (kk = 0; kk < pi1->stn.num_ig; kk++) {</div><div>+ if (!_stream_cmp(&pi1->stn.ig[kk], &pi2->stn.ig[kk])) {</div>
<div>+ goto next;</div><div>+ }</div><div>+ }</div><div>+ for (kk = 0; kk < pi1->stn.num_secondary_audio; kk++) {</div><div>+ if (!_stream_cmp(&pi1->stn.secondary_audio[kk],</div>
<div>+ &pi2->stn.secondary_audio[kk])) {</div><div>+ goto next;</div><div>+ }</div><div>+ }</div><div>+ for (kk = 0; kk < pi1->stn.num_secondary_video; kk++) {</div>
<div>+ if (!_stream_cmp(&pi1->stn.secondary_video[kk],</div><div>+ &pi2->stn.secondary_video[kk])) {</div><div>+ goto next;</div><div>+ }</div>
<div>+ }</div><div> }</div><div>+next:</div><div> if (jj != pl->list_count) {</div><div> continue;</div><div> }</div></div></div>