summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Mitchell <kevmitch@gmail.com>2015-09-09 20:28:22 -0700
committerKevin Mitchell <kevmitch@gmail.com>2015-09-10 23:46:06 -0700
commit269f271b7373091790be61fe38e37eb2c8cb98f8 (patch)
tree7c1fa8ac9d9ba9eeafcd8766d6892bb9b141cc61
parentfdf6e5f5aa0cf79b57894f9a32628c7c7af8bc10 (diff)
downloadmpv-269f271b7373091790be61fe38e37eb2c8cb98f8.tar.bz2
mpv-269f271b7373091790be61fe38e37eb2c8cb98f8.tar.xz
video: make --field-dominance set interlaced flag
fixes #2289
-rw-r--r--DOCS/man/options.rst4
-rw-r--r--video/decode/dec_video.c10
2 files changed, 10 insertions, 4 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index f1d045622a..69a2147b37 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -761,6 +761,10 @@ Video
:top: top field first
:bottom: bottom field first
+ .. note::
+
+ Setting either ``top`` or ``bottom`` will flag all frames as interlaced.
+
``--frames=<number>``
Play/convert only first ``<number>`` video frames, then quit.
diff --git a/video/decode/dec_video.c b/video/decode/dec_video.c
index 34b437aa52..f46d1c47ac 100644
--- a/video/decode/dec_video.c
+++ b/video/decode/dec_video.c
@@ -326,11 +326,13 @@ struct mp_image *video_decode(struct dec_video *d_video,
return NULL; // error / skipped frame
}
- if (opts->field_dominance == 0)
- mpi->fields |= MP_IMGFIELD_TOP_FIRST;
- else if (opts->field_dominance == 1)
+ if (opts->field_dominance == 0) {
+ mpi->fields |= MP_IMGFIELD_TOP_FIRST | MP_IMGFIELD_INTERLACED;
+ } else if (opts->field_dominance == 1) {
mpi->fields &= ~MP_IMGFIELD_TOP_FIRST;
-
+ mpi->fields |= MP_IMGFIELD_INTERLACED;
+ }
+
// Note: the PTS is reordered, but the DTS is not. Both should be monotonic.
double pts = d_video->codec_pts;
double dts = d_video->codec_dts;