libdvdnav | branch: master | Jean-Baptiste Kempf <[email protected]> | Tue Mar 4 15:17:08 2014 +0100| [4d3753fe408b7cc81d04c368cc0cc33f7ce49170] | committer: Jean-Baptiste Kempf
Do not assert in vm_get_video_aspect Failing is a correct behavior, here... LP: #370884 > http://git.videolan.org/gitweb.cgi/libdvdnav.git/?a=commit;h=4d3753fe408b7cc81d04c368cc0cc33f7ce49170 --- src/vm/vmget.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vm/vmget.c b/src/vm/vmget.c index 6155a9b..80085c5 100644 --- a/src/vm/vmget.c +++ b/src/vm/vmget.c @@ -296,7 +296,11 @@ void vm_get_video_res(vm_t *vm, int *width, int *height) { int vm_get_video_aspect(vm_t *vm) { int aspect = vm_get_video_attr(vm).display_aspect_ratio; - assert(aspect == 0 || aspect == 3); + if(aspect != 0 && aspect != 3) { + fprintf(MSG_OUT, "libdvdnav: display aspect ratio is unexpected: %d!\n", aspect); + return -1; + } + (vm->state).registers.SPRM[14] &= ~(0x3 << 10); (vm->state).registers.SPRM[14] |= aspect << 10; _______________________________________________ DVDnav-discuss mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/dvdnav-discuss
