[Ffmpeg-cvslog] r7128 - trunk/libavformat/matroska.c

aurel subversion
Mon Nov 20 01:15:52 CET 2006


Author: aurel
Date: Mon Nov 20 01:15:52 2006
New Revision: 7128

Modified:
   trunk/libavformat/matroska.c

Log:
matroska: properly handle real video extradata

Modified: trunk/libavformat/matroska.c
==============================================================================
--- trunk/libavformat/matroska.c	(original)
+++ trunk/libavformat/matroska.c	Mon Nov 20 01:15:52 2006
@@ -2193,6 +2193,7 @@
             enum CodecID codec_id = CODEC_ID_NONE;
             uint8_t *extradata = NULL;
             int extradata_size = 0;
+            int extradata_offset = 0;
             track = matroska->tracks[i];
 
             /* libavformat does not really support subtitles.
@@ -2262,6 +2263,12 @@
                 }
             }
 
+            else if (codec_id == CODEC_ID_RV10 || codec_id == CODEC_ID_RV20 ||
+                     codec_id == CODEC_ID_RV30 || codec_id == CODEC_ID_RV40) {
+                extradata_offset = 26;
+                track->codec_priv_size -= extradata_offset;
+            }
+
             if (codec_id == CODEC_ID_NONE) {
                 av_log(matroska->ctx, AV_LOG_INFO,
                        "Unknown/unsupported CodecID %s.\n",
@@ -2290,7 +2297,7 @@
                 if(st->codec->extradata == NULL)
                     return AVERROR_NOMEM;
                 st->codec->extradata_size = track->codec_priv_size;
-                memcpy(st->codec->extradata, track->codec_priv,
+                memcpy(st->codec->extradata,track->codec_priv+extradata_offset,
                        track->codec_priv_size);
             }
 




More information about the ffmpeg-cvslog mailing list