[FFmpeg-cvslog] r13721 - in trunk/libavformat: ffmdec.c ffmenc.c

bcoudurier subversion
Mon Jun 9 02:36:28 CEST 2008


Author: bcoudurier
Date: Mon Jun  9 02:36:27 2008
New Revision: 13721

Log:
pass extradata through ffm

Modified:
   trunk/libavformat/ffmdec.c
   trunk/libavformat/ffmenc.c

Modified: trunk/libavformat/ffmdec.c
==============================================================================
--- trunk/libavformat/ffmdec.c	(original)
+++ trunk/libavformat/ffmdec.c	Mon Jun  9 02:36:27 2008
@@ -320,7 +320,13 @@ static int ffm_read_header(AVFormatConte
         default:
             goto fail;
         }
-
+        if (codec->flags & CODEC_FLAG_GLOBAL_HEADER) {
+            codec->extradata_size = get_be32(pb);
+            codec->extradata = av_malloc(codec->extradata_size);
+            if (!codec->extradata)
+                return AVERROR(ENOMEM);
+            get_buffer(pb, codec->extradata, codec->extradata_size);
+        }
     }
 
     /* get until end of block reached */

Modified: trunk/libavformat/ffmenc.c
==============================================================================
--- trunk/libavformat/ffmenc.c	(original)
+++ trunk/libavformat/ffmenc.c	Mon Jun  9 02:36:27 2008
@@ -168,6 +168,10 @@ static int ffm_write_header(AVFormatCont
         default:
             return -1;
         }
+        if (codec->flags & CODEC_FLAG_GLOBAL_HEADER) {
+            put_be32(pb, codec->extradata_size);
+            put_buffer(pb, codec->extradata, codec->extradata_size);
+        }
     }
 
     /* flush until end of block reached */




More information about the ffmpeg-cvslog mailing list