summaryrefslogtreecommitdiff
path: root/libavformat/oggparsedirac.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-12-17 16:01:43 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2015-12-17 19:00:26 +0100
commite839db2288447db471af3e4643d1f350265cd1ac (patch)
treebe29d59b2a6bf951a48f5816c969c66db22579a0 /libavformat/oggparsedirac.c
parentffad6f6b89624c1df163cb81846ca1d9b7363e2e (diff)
downloadffmpeg-e839db2288447db471af3e4643d1f350265cd1ac.tar.gz
avformat/oggparsedirac: Export sample aspect ratio
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/oggparsedirac.c')
-rw-r--r--libavformat/oggparsedirac.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/oggparsedirac.c b/libavformat/oggparsedirac.c
index a39ea4a319..3e5e3930b2 100644
--- a/libavformat/oggparsedirac.c
+++ b/libavformat/oggparsedirac.c
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
#include "libavcodec/dirac.h"
#include "avformat.h"
@@ -51,6 +52,8 @@ static int dirac_header(AVFormatContext *s, int idx)
st->codec->colorspace = dsh->colorspace;
st->codec->profile = dsh->profile;
st->codec->level = dsh->level;
+ if (av_image_check_sar(st->codec->width, st->codec->height, dsh->sample_aspect_ratio) >= 0)
+ st->sample_aspect_ratio = dsh->sample_aspect_ratio;
// dirac in ogg always stores timestamps as though the video were interlaced
avpriv_set_pts_info(st, 64, dsh->framerate.den, 2 * dsh->framerate.num);