Commit 737b0ca6 authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 592b053c 209e91cb
...@@ -153,7 +153,6 @@ static int decode_frame(AVCodecContext *avctx, ...@@ -153,7 +153,6 @@ static int decode_frame(AVCodecContext *avctx,
bytestream2_init(&gbc, avpkt->data, avpkt->size); bytestream2_init(&gbc, avpkt->data, avpkt->size);
if ( bytestream2_get_bytes_left(&gbc) >= 552 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) && check_header(gbc.buffer + 512, bytestream2_get_bytes_left(&gbc) - 512)
) )
bytestream2_skip(&gbc, 512); bytestream2_skip(&gbc, 512);
......
...@@ -1575,7 +1575,7 @@ static void mkv_write_block(AVFormatContext *s, AVIOContext *pb, ...@@ -1575,7 +1575,7 @@ static void mkv_write_block(AVFormatContext *s, AVIOContext *pb,
} else } else
data = pkt->data; 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 /* Matroska specification requires to remove the first QuickTime atom
*/ */
size -= 8; size -= 8;
......
...@@ -1607,9 +1607,10 @@ static int mov_write_colr_tag(AVIOContext *pb, MOVTrack *track) ...@@ -1607,9 +1607,10 @@ static int mov_write_colr_tag(AVIOContext *pb, MOVTrack *track)
default: avio_wb16(pb, 2); default: avio_wb16(pb, 2);
} }
switch (track->enc->colorspace) { switch (track->enc->colorspace) {
case AVCOL_TRC_BT709: avio_wb16(pb, 1); break; case AVCOL_SPC_BT709: avio_wb16(pb, 1); break;
case AVCOL_PRI_SMPTE170M: avio_wb16(pb, 6); break; case AVCOL_SPC_BT470BG:
case AVCOL_PRI_SMPTE240M: avio_wb16(pb, 7); break; case AVCOL_SPC_SMPTE170M: avio_wb16(pb, 6); break;
case AVCOL_SPC_SMPTE240M: avio_wb16(pb, 7); break;
default: avio_wb16(pb, 2); default: avio_wb16(pb, 2);
} }
......
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