changeset 3466:b00b81c315e5 libavformat

simplify MODE_3G2
author michael
date Thu, 12 Jun 2008 03:08:41 +0000
parents cee1910ad600
children 7baaf426d757
files movenc.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/movenc.c	Thu Jun 12 03:08:08 2008 +0000
+++ b/movenc.c	Thu Jun 12 03:08:41 2008 +0000
@@ -526,7 +526,7 @@
         if (!match_ext(s->filename, "m4a") && !match_ext(s->filename, "m4v"))
             av_log(s, AV_LOG_WARNING, "Warning, extension is not .m4a nor .m4v "
                    "Quicktime/Ipod might not play the file\n");
-    } else if (track->mode == MODE_3GP || track->mode == MODE_3G2) {
+    } else if (track->mode & MODE_3GP) {
         tag = codec_get_tag(codec_3gp_tags, track->enc->codec_id);
     } else if (!tag || (track->enc->strict_std_compliance >= FF_COMPLIANCE_NORMAL &&
                         (tag == MKTAG('d','v','c','p') ||
@@ -1255,7 +1255,7 @@
         put_be32(pb, 0); /* size */
         put_tag(pb, "udta");
 
-        if (mov->mode == MODE_3GP || mov->mode == MODE_3G2) {
+        if (mov->mode & MODE_3GP) {
             mov_write_3gp_udta_tag(pb, s, "titl", s->title);
             mov_write_3gp_udta_tag(pb, s, "auth", s->author);
             mov_write_3gp_udta_tag(pb, s, "gnre", s->genre);
@@ -1384,7 +1384,7 @@
 
     if (mov->mode == MODE_3GP)
         put_tag(pb, "3gp4");
-    else if (mov->mode == MODE_3G2)
+    else if (mov->mode & MODE_3G2)
         put_tag(pb, "3g2a");
     else if (mov->mode == MODE_PSP)
         put_tag(pb, "MSNV");
@@ -1405,7 +1405,7 @@
 
     if (mov->mode == MODE_3GP)
         put_tag(pb, "3gp4");
-    else if (mov->mode == MODE_3G2)
+    else if (mov->mode & MODE_3G2)
         put_tag(pb, "3g2a");
     else if (mov->mode == MODE_PSP)
         put_tag(pb, "MSNV");
@@ -1494,7 +1494,7 @@
 
     if (s->oformat != NULL) {
         if (!strcmp("3gp", s->oformat->name)) mov->mode = MODE_3GP;
-        else if (!strcmp("3g2", s->oformat->name)) mov->mode = MODE_3G2;
+        else if (!strcmp("3g2", s->oformat->name)) mov->mode = MODE_3GP|MODE_3G2;
         else if (!strcmp("mov", s->oformat->name)) mov->mode = MODE_MOV;
         else if (!strcmp("psp", s->oformat->name)) mov->mode = MODE_PSP;
         else if (!strcmp("ipod",s->oformat->name)) mov->mode = MODE_IPOD;