[libdvdnav-devel] [PATCH] Clean up order of variables, display of output.

beandog at gentoo.org beandog at gentoo.org
Fri May 16 03:20:59 CEST 2014


From: Steve Dibb <beandog at gentoo.org>

Remove redundant check for video_attr.

Rearrange checks for attributes to match same order as declarations.

Move video unknown string to last displayed, similar to audio output, and use same naming scheme.
---
 src/ifo_print.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/src/ifo_print.c b/src/ifo_print.c
index 7438aec..2f469dd 100644
--- a/src/ifo_print.c
+++ b/src/ifo_print.c
@@ -88,10 +88,9 @@ static void ifo_print_video_attributes(video_attr_t *attr) {
      && attr->video_format == 0
      && attr->display_aspect_ratio == 0
      && attr->permitted_df == 0
-     && attr->unknown1 == 0
      && attr->line21_cc_1 == 0
      && attr->line21_cc_2 == 0
-     && attr->video_format == 0
+     && attr->unknown1 == 0
      && attr->letterboxed == 0
      && attr->film_mode == 0) {
     printf("-- Unspecified --");
@@ -149,9 +148,6 @@ static void ifo_print_video_attributes(video_attr_t *attr) {
     printf("(please send a bug report), ");
   }
 
-  printf("U%x, ", attr->unknown1);
-  /* assert(!attr->unknown1); */
-
   if(attr->line21_cc_1 || attr->line21_cc_2) {
     printf("NTSC CC ");
     if(attr->line21_cc_1)
@@ -187,10 +183,13 @@ static void ifo_print_video_attributes(video_attr_t *attr) {
   }
 
   if(attr->film_mode) {
-    printf("film. ");
+    printf("film, ");
   } else {
-    printf("video. "); //camera
+    printf("video, "); //camera
   }
+
+  printf("Unknown1: %x", attr->unknown1);
+
 }
 
 static void ifo_print_audio_attributes(audio_attr_t *attr) {
@@ -201,9 +200,9 @@ static void ifo_print_audio_attributes(audio_attr_t *attr) {
      && attr->application_mode == 0
      && attr->quantization == 0
      && attr->sample_frequency == 0
+     && attr->unknown1 == 0
      && attr->channels == 0
      && attr->lang_extension == 0
-     && attr->unknown1 == 0
      && attr->unknown3 == 0) {
     printf("-- Unspecified --");
     return;
@@ -351,9 +350,9 @@ static void ifo_print_audio_attributes(audio_attr_t *attr) {
 static void ifo_print_subp_attributes(subp_attr_t *attr) {
 
   if(attr->type == 0
-     && attr->lang_code == 0
      && attr->zero1 == 0
      && attr->zero2 == 0
+     && attr->lang_code == 0
      && attr->lang_extension== 0) {
     printf("-- Unspecified --");
     return;
-- 
1.8.3.2



More information about the libdvdnav-devel mailing list