summaryrefslogtreecommitdiffstats
path: root/demux/demux_lavf.c
diff options
context:
space:
mode:
Diffstat (limited to 'demux/demux_lavf.c')
-rw-r--r--demux/demux_lavf.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c
index 90fde22eba..08f05c18df 100644
--- a/demux/demux_lavf.c
+++ b/demux/demux_lavf.c
@@ -478,6 +478,14 @@ static void handle_stream(demuxer_t *demuxer, int i)
/ (float)(codec->height * codec->sample_aspect_ratio.den);
sh_video->i_bps = codec->bit_rate / 8;
+ AVDictionaryEntry *rot = av_dict_get(st->metadata, "rotate", NULL, 0);
+ if (rot && rot->value) {
+ char *end = NULL;
+ long int r = strtol(rot->value, &end, 10);
+ if (end && !end[0])
+ sh_video->rotate = ((r % 360) + 360) % 360;
+ }
+
// This also applies to vfw-muxed mkv, but we can't detect these easily.
sh_video->avi_dts = matches_avinputformat_name(priv, "avi");