diff options
author | Paul B Mahol <onemda@gmail.com> | 2012-10-11 14:38:48 +0400 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2012-10-13 12:22:26 +0400 |
commit | f2f711cde2776fa95a0974271228c44a6dd72a7a (patch) | |
tree | 9da4454cc05f820b155e6452f3c2374f1121a2c4 /libavcodec | |
parent | 92b3d8bc53377f106eae71c69240942550a230a1 (diff) |
pcx: read sample aspect ratio
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/pcx.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/pcx.c b/libavcodec/pcx.c index 06f0f0fb55..722e89ff96 100644 --- a/libavcodec/pcx.c +++ b/libavcodec/pcx.c @@ -102,6 +102,8 @@ static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *data_size, ymin = bytestream2_get_le16u(&gb); xmax = bytestream2_get_le16u(&gb); ymax = bytestream2_get_le16u(&gb); + avctx->sample_aspect_ratio.num = bytestream2_get_le16u(&gb); + avctx->sample_aspect_ratio.den = bytestream2_get_le16u(&gb); if (xmax < xmin || ymax < ymin) { av_log(avctx, AV_LOG_ERROR, "invalid image dimensions\n"); @@ -111,7 +113,7 @@ static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *data_size, w = xmax - xmin + 1; h = ymax - ymin + 1; - bytestream2_skipu(&gb, 53); + bytestream2_skipu(&gb, 49); nplanes = bytestream2_get_byteu(&gb); bytes_per_line = bytestream2_get_le16u(&gb); bytes_per_scanline = nplanes * bytes_per_line; |