changeset 3857:50bb82abb278 libavformat

copy whole frame in vosData for dnxhd, this code will be used for other codecs too
author bcoudurier
date Sun, 31 Aug 2008 20:20:12 +0000
parents 055f8385670c
children 62a7a6a6a038
files movenc.c
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/movenc.c	Sun Aug 31 17:32:58 2008 +0000
+++ b/movenc.c	Sun Aug 31 20:20:12 2008 +0000
@@ -1613,12 +1613,10 @@
         assert(pkt->size);
         size = pkt->size;
     } else if (enc->codec_id == CODEC_ID_DNXHD && !trk->vosLen) {
-        /* copy frame header to create needed atoms */
-        if (size < 640)
-            return -1;
-        trk->vosLen = 640;
-        trk->vosData = av_malloc(trk->vosLen);
-        memcpy(trk->vosData, pkt->data, 640);
+        /* copy frame to create needed atoms */
+        trk->vosLen = size;
+        trk->vosData = av_malloc(size);
+        memcpy(trk->vosData, pkt->data, size);
     }
 
     if (!(trk->entry % MOV_INDEX_CLUSTER_SIZE)) {