Commit 63a62539 authored by bcoudurier's avatar bcoudurier

copy whole frame in vosData for dnxhd, this code will be used for other codecs too

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@15131 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 160eea20
...@@ -1613,12 +1613,10 @@ static int mov_write_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -1613,12 +1613,10 @@ static int mov_write_packet(AVFormatContext *s, AVPacket *pkt)
assert(pkt->size); assert(pkt->size);
size = pkt->size; size = pkt->size;
} else if (enc->codec_id == CODEC_ID_DNXHD && !trk->vosLen) { } else if (enc->codec_id == CODEC_ID_DNXHD && !trk->vosLen) {
/* copy frame header to create needed atoms */ /* copy frame to create needed atoms */
if (size < 640) trk->vosLen = size;
return -1; trk->vosData = av_malloc(size);
trk->vosLen = 640; memcpy(trk->vosData, pkt->data, size);
trk->vosData = av_malloc(trk->vosLen);
memcpy(trk->vosData, pkt->data, 640);
} }
if (!(trk->entry % MOV_INDEX_CLUSTER_SIZE)) { if (!(trk->entry % MOV_INDEX_CLUSTER_SIZE)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment