diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-08-31 20:20:12 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-08-31 20:20:12 +0000 |
commit | db568c079a3c3a12b6fa2f478780fde94a6e88b5 (patch) | |
tree | 5ed526a93a52c831362c142c4ca20b37f6992b81 /libavformat/movenc.c | |
parent | 9a584db43c1b925c105dc5eb5321903a49241939 (diff) | |
download | ffmpeg-db568c079a3c3a12b6fa2f478780fde94a6e88b5.tar.gz |
copy whole frame in vosData for dnxhd, this code will be used for other codecs too
Originally committed as revision 15131 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r-- | libavformat/movenc.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 0343be3e2e..f05987ecd6 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1613,12 +1613,10 @@ static int mov_write_packet(AVFormatContext *s, AVPacket *pkt) 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)) { |