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

Steve Dibb git at videolan.org
Fri May 16 17:05:53 CEST 2014


libdvdread | branch: master | Steve Dibb <beandog at gentoo.org> | Thu May 15 19:20:59 2014 -0600| [6733be216f17c75af74e61f0e4e1083492684796] | committer: Jean-Baptiste Kempf

Clean up order of variables, display of output.

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.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/libdvdread.git/?a=commit;h=6733be216f17c75af74e61f0e4e1083492684796
---

 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;



More information about the libdvdnav-devel mailing list