diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-05-21 01:26:30 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-05-21 01:26:36 +0200 |
commit | 737b0ca65b485a85ab1996241be05d08d1878682 (patch) | |
tree | c4a51a82f3fec6d1216143d243d7dcf47574a1fa | |
parent | 592b053c7bacde6d13fe69bffd5b1b3b71fa1ca9 (diff) | |
parent | 209e91cbc4e1c4feaa3b7c2671b864b77874eff8 (diff) |
Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
lavc/qdrw: Do not fail decoding valid Quickdraw images.
lavf/mov: Use AVCOL_SPC constants when checking color_space.
lavf/mov: Write colour matrix "6" for color_space bt470bg.
lavf/mkv: Only skip prores header if the packet is large enough.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/qdrw.c | 1 | ||||
-rw-r--r-- | libavformat/matroskaenc.c | 2 | ||||
-rw-r--r-- | libavformat/movenc.c | 7 |
3 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/qdrw.c b/libavcodec/qdrw.c index 0bcf5dca22..838f836516 100644 --- a/libavcodec/qdrw.c +++ b/libavcodec/qdrw.c @@ -153,7 +153,6 @@ static int decode_frame(AVCodecContext *avctx, bytestream2_init(&gbc, avpkt->data, avpkt->size); if ( bytestream2_get_bytes_left(&gbc) >= 552 - && !check_header(gbc.buffer , bytestream2_get_bytes_left(&gbc)) && check_header(gbc.buffer + 512, bytestream2_get_bytes_left(&gbc) - 512) ) bytestream2_skip(&gbc, 512); diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 7cbba0b002..c4c58f4d09 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -1575,7 +1575,7 @@ static void mkv_write_block(AVFormatContext *s, AVIOContext *pb, } else data = pkt->data; - if (codec->codec_id == AV_CODEC_ID_PRORES) { + if (codec->codec_id == AV_CODEC_ID_PRORES && size >= 8) { /* Matroska specification requires to remove the first QuickTime atom */ size -= 8; diff --git a/libavformat/movenc.c b/libavformat/movenc.c index b6821d447c..9cad1ae06b 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1607,9 +1607,10 @@ static int mov_write_colr_tag(AVIOContext *pb, MOVTrack *track) default: avio_wb16(pb, 2); } switch (track->enc->colorspace) { - case AVCOL_TRC_BT709: avio_wb16(pb, 1); break; - case AVCOL_PRI_SMPTE170M: avio_wb16(pb, 6); break; - case AVCOL_PRI_SMPTE240M: avio_wb16(pb, 7); break; + case AVCOL_SPC_BT709: avio_wb16(pb, 1); break; + case AVCOL_SPC_BT470BG: + case AVCOL_SPC_SMPTE170M: avio_wb16(pb, 6); break; + case AVCOL_SPC_SMPTE240M: avio_wb16(pb, 7); break; default: avio_wb16(pb, 2); } |