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>
pull/137/head
Michael Niedermayer 10 years ago
commit 737b0ca65b
  1. 1
      libavcodec/qdrw.c
  2. 2
      libavformat/matroskaenc.c
  3. 7
      libavformat/movenc.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);

@ -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;

@ -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);
}

Loading…
Cancel
Save