[FFmpeg-cvslog] exr: support for reading pixelAspectRatio
Paul B Mahol
git at videolan.org
Mon Jul 9 04:51:49 CEST 2012
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Jul 9 00:51:22 2012 +0000| [07df939aa32f723deaec80cbfd6526912ee52348] | committer: Paul B Mahol
exr: support for reading pixelAspectRatio
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=07df939aa32f723deaec80cbfd6526912ee52348
---
libavcodec/exr.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index 5ff2c6f..6388794 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -300,6 +300,17 @@ static int decode_frame(AVCodecContext *avctx,
continue;
}
+ // Process the pixelAspectRatio variable
+ if (check_header_variable(avctx, &buf, buf_end, "pixelAspectRatio", "float", 31, &variable_buffer_data_size) >= 0) {
+ if (!variable_buffer_data_size)
+ return -1;
+
+ avctx->sample_aspect_ratio = av_d2q(av_int2float(AV_RL32(buf)), 255);
+
+ buf += variable_buffer_data_size;
+ continue;
+ }
+
// Process the compression variable
if (check_header_variable(avctx, &buf, buf_end, "compression", "compression", 29, &variable_buffer_data_size) >= 0) {
if (!variable_buffer_data_size)
More information about the ffmpeg-cvslog
mailing list