changeset 3758:e966560661e5 libavformat

export sample_aspect_ratio read by the demuxer in a separate field that the one read by the decoder.
author aurel
date Sat, 23 Aug 2008 23:13:58 +0000
parents 7ab85dd1ef03
children 27537074f2a9
files avformat.h utils.c
diffstat 2 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/avformat.h	Sat Aug 23 22:36:35 2008 +0000
+++ b/avformat.h	Sat Aug 23 23:13:58 2008 +0000
@@ -22,7 +22,7 @@
 #define FFMPEG_AVFORMAT_H
 
 #define LIBAVFORMAT_VERSION_MAJOR 52
-#define LIBAVFORMAT_VERSION_MINOR 20
+#define LIBAVFORMAT_VERSION_MINOR 21
 #define LIBAVFORMAT_VERSION_MICRO  0
 
 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
@@ -402,6 +402,13 @@
     AVProbeData probe_data;
 #define MAX_REORDER_DELAY 16
     int64_t pts_buffer[MAX_REORDER_DELAY+1];
+
+    /**
+     * sample aspect ratio (0 if unknown)
+     * - encoding: Set by user.
+     * - decoding: Set by libavformat.
+     */
+    AVRational sample_aspect_ratio;
 } AVStream;
 
 #define AV_PROGRAM_RUNNING 1
--- a/utils.c	Sat Aug 23 22:36:35 2008 +0000
+++ b/utils.c	Sat Aug 23 23:13:58 2008 +0000
@@ -2331,6 +2331,8 @@
     for(i=0; i<MAX_REORDER_DELAY+1; i++)
         st->pts_buffer[i]= AV_NOPTS_VALUE;
 
+    st->sample_aspect_ratio = (AVRational){0,1};
+
     s->streams[s->nb_streams++] = st;
     return st;
 }