Ping?

On 01/26/2013 05:46 PM, Erik Auerswald wrote:
Hi,

svn revision 1245 broke playback of DVDs _with_ menu by incorrectly
translating an assertion into an early return:

---[cut here]---
$ svn log -r1244:1245
------------------------------------------------------------------------
r1245 | rathann | 2012-12-09 22:13:14 +0100 (Sun, 09 Dec 2012) | 4 lines

Fix failed assertion when there's no menu.

Patch by Erik Hovland.

------------------------------------------------------------------------
$ svn diff -r1244:1245
Index: vm/vm.c
===================================================================
--- vm/vm.c (revision 1244)
+++ vm/vm.c (revision 1245)
@@ -1762,7 +1762,8 @@
pgcit_t *pgcit;

pgcit = get_PGCIT(vm);
- assert(pgcit != NULL); /* ?? Make this return -1 instead */
+ if (pgcit != NULL)
+ return 0;

if(pgcN < 1 || pgcN > pgcit->nr_of_pgci_srp) {
#ifdef TRACE
---[cut here]---

To return early if the assertion fails would be

---[cut here]---
Index: vm/vm.c
===================================================================
--- vm/vm.c (revision 1250)
+++ vm/vm.c (working copy)
@@ -1762,7 +1762,7 @@
pgcit_t *pgcit;

pgcit = get_PGCIT(vm);
- if (pgcit != NULL)
+ if (pgcit == NULL)
return 0;

if(pgcN < 1 || pgcN > pgcit->nr_of_pgci_srp) {
---[cut here]---

This simple change restores playback of DVDs containing a menu.

The current code skips the actual functionality of vm.c::set_PGCN() if
the call to vm.c::get_PGCIT() was successful!

There were quite a few bug reports about MPlayer (svn version) dvdnav://
playback being broken, see this MPlayer-users thread:

http://lists.mplayerhq.hu/pipermail/mplayer-users/2013-January/085825.html

My patch (inline above, attached as well) fixes this regression (tested
with current MPlayer from svn) and fits the commit log of revision 1245.

Please consider applying.

Thanks,
Erik


_______________________________________________
DVDnav-discuss mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/dvdnav-discuss

_______________________________________________
DVDnav-discuss mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/dvdnav-discuss

Reply via email to