Commit 4843a9c7 authored by Zoltan Kovacs's avatar Zoltan Kovacs Committed by Vittorio Giovara

dpx: always write the image offset

According to the DPX file format description found at
http://www.fileformat.info/format/dpx/egff.htm the ImageElement part of
the GenericImageHeader also contains an an offset to the real image data
beside the same member that can be found in the GenericFileHeader.

Libav keeps this member empty (=0) while some applications expects it to
be filled properly. FATE test updated accordingly.

Bug-Id: 742
Signed-off-by: 's avatarVittorio Giovara <vittorio.giovara@gmail.com>
parent 250e077e
...@@ -144,6 +144,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, ...@@ -144,6 +144,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
buf[802] = 2; /* linear colorimetric */ buf[802] = 2; /* linear colorimetric */
buf[803] = s->bits_per_component; buf[803] = s->bits_per_component;
write16(buf + 804, s->bits_per_component == 10 ? 1 : 0); /* packing method */ write16(buf + 804, s->bits_per_component == 10 ? 1 : 0); /* packing method */
write32(buf + 808, HEADER_SIZE); /* data offset */
/* Image source information header */ /* Image source information header */
write32(buf + 1628, avctx->sample_aspect_ratio.num); write32(buf + 1628, avctx->sample_aspect_ratio.num);
......
808ea110635774252439722a48329d61 *./tests/data/images/dpx/02.dpx d2f0b4e854fda2d3b3bee84cef80593c *./tests/data/images/dpx/02.dpx
./tests/data/images/dpx/%02d.dpx CRC=0x28c7369b ./tests/data/images/dpx/%02d.dpx CRC=0x28c7369b
305792 ./tests/data/images/dpx/02.dpx 305792 ./tests/data/images/dpx/02.dpx
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