changeset 1681:23c911d09382 libavformat

set codec_tag from codec_id if its not set and can be set based on the AVCodecTag tables
author michael
date Sun, 21 Jan 2007 12:31:58 +0000
parents 9240521ca4fd
children 1c6ee4cf8a38
files utils.c
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Sun Jan 21 12:30:44 2007 +0000
+++ b/utils.c	Sun Jan 21 12:31:58 2007 +0000
@@ -2182,6 +2182,17 @@
             }
             break;
         }
+
+        if(s->oformat->codec_tag){
+            if(st->codec->codec_tag){
+                //FIXME
+                //check that tag + id is in the table
+                //if neither is in the table -> ok
+                //if tag is in the table with another id -> FAIL
+                //if id is in the table with another tag -> FAIL unless strict < ?
+            }else
+                st->codec->codec_tag= av_codec_get_tag(s->oformat->codec_tag, st->codec->codec_id);
+        }
     }
 
     if (!s->priv_data && s->oformat->priv_data_size > 0) {