changeset 6184:4ba171d6d84a libavcodec

Add support for Matroska attachments. patch by eugeni _dot_ stepanov _at_ gmail.com and myself
author aurel
date Sun, 27 Jan 2008 15:43:17 +0000
parents b65c4378ecfe
children b9d115ed13fa
files avcodec.h utils.c
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/avcodec.h	Sun Jan 27 14:52:58 2008 +0000
+++ b/avcodec.h	Sun Jan 27 15:43:17 2008 +0000
@@ -33,8 +33,8 @@
 #define AV_STRINGIFY(s)         AV_TOSTRING(s)
 #define AV_TOSTRING(s) #s
 
-#define LIBAVCODEC_VERSION_INT  ((51<<16)+(49<<8)+0)
-#define LIBAVCODEC_VERSION      51.49.0
+#define LIBAVCODEC_VERSION_INT  ((51<<16)+(50<<8)+0)
+#define LIBAVCODEC_VERSION      51.50.0
 #define LIBAVCODEC_BUILD        LIBAVCODEC_VERSION_INT
 
 #define LIBAVCODEC_IDENT        "Lavc" AV_STRINGIFY(LIBAVCODEC_VERSION)
@@ -284,6 +284,9 @@
     CODEC_ID_XSUB,
     CODEC_ID_SSA,
 
+    /* other specific kind of codecs (generaly used for attachments) */
+    CODEC_ID_TTF= 0x18000,
+
     CODEC_ID_MPEG2TS= 0x20000, /**< _FAKE_ codec to indicate a raw MPEG-2 TS
                                 * stream (only used by libavformat) */
 };
@@ -300,6 +303,7 @@
     CODEC_TYPE_AUDIO,
     CODEC_TYPE_DATA,
     CODEC_TYPE_SUBTITLE,
+    CODEC_TYPE_ATTACHMENT,
     CODEC_TYPE_NB
 };
 
--- a/utils.c	Sun Jan 27 14:52:58 2008 +0000
+++ b/utils.c	Sun Jan 27 15:43:17 2008 +0000
@@ -1219,6 +1219,10 @@
         snprintf(buf, buf_size, "Subtitle: %s", codec_name);
         bitrate = enc->bit_rate;
         break;
+    case CODEC_TYPE_ATTACHMENT:
+        snprintf(buf, buf_size, "Attachment: %s", codec_name);
+        bitrate = enc->bit_rate;
+        break;
     default:
         snprintf(buf, buf_size, "Invalid Codec type %d", enc->codec_type);
         return;