Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-05-04 00:49:16 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-05-04 00:49:16 +0300
commit4351c288b9841d02a55e7b836796d7da6d19cac8 (patch)
tree0e2f5ae6b1d0a8a476d1bd16c001d9927074a544 /ffplay.c
parenta6b630e9b6d873d97c91322608ce4ac5fb9bed78 (diff)
ffplay&cmdutils:Factor get_rotation() code out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/ffplay.c b/ffplay.c
index eea00e6e14..9ce13d71fb 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -32,7 +32,6 @@
#include "libavutil/avstring.h"
#include "libavutil/colorspace.h"
-#include "libavutil/display.h"
#include "libavutil/eval.h"
#include "libavutil/mathematics.h"
#include "libavutil/pixdesc.h"
@@ -2018,21 +2017,7 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c
INSERT_FILT("crop", "floor(in_w/2)*2:floor(in_h/2)*2");
if (autorotate) {
- AVDictionaryEntry *rotate_tag = av_dict_get(is->video_st->metadata, "rotate", NULL, 0);
- uint8_t* displaymatrix = av_stream_get_side_data(is->video_st,
- AV_PKT_DATA_DISPLAYMATRIX, NULL);
- double theta = 0;
-
- if (rotate_tag && *rotate_tag->value && strcmp(rotate_tag->value, "0")) {
- char *tail;
- theta = av_strtod(rotate_tag->value, &tail);
- if (*tail)
- theta = 0;
- }
- if (displaymatrix && !theta)
- theta = av_display_rotation_get((int32_t*) displaymatrix);
-
- theta -= 360*floor(theta/360 + 0.9/360);
+ double theta = get_rotation(is->video_st);
if (fabs(theta - 90) < 1.0) {
INSERT_FILT("transpose", "clock");