diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-02-14 00:55:25 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-02-14 00:55:25 +0100 |
commit | a08ebf04b1b06e6182f227561e48efac36b11a6d (patch) | |
tree | 989dd26fd63cc7d694ee0006cebee0a0496e3600 | |
parent | 30c5c45b123c45ede70988088528a2de6c869c3f (diff) | |
download | ffmpeg-a08ebf04b1b06e6182f227561e48efac36b11a6d.tar.gz |
matroskadec: simplify additional_id writing code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/matroskadec.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 94079abdc7..3519a136ce 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -2131,13 +2131,11 @@ static int matroska_parse_frame(MatroskaDemuxContext *matroska, if (additional_size > 0) { uint8_t *side_data = av_packet_new_side_data(pkt, AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, - additional_size + sizeof(additional_id)); - uint8_t additional_id_buf[8]; + additional_size + 8); if(side_data == NULL) { return AVERROR(ENOMEM); } - AV_WB64(additional_id_buf, additional_id); - memcpy(side_data, additional_id_buf, 8); + AV_WB64(side_data, additional_id); memcpy(side_data + 8, additional, additional_size); } |