Created
October 22, 2017 15:52
-
-
Save max-verem/96009bdd71299220c8f37df0515365f3 to your computer and use it in GitHub Desktop.
Set frame interlaced if required but still progressive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From b4a75e97301a3c3ad039a49ba29f6fcedf7d1902 Mon Sep 17 00:00:00 2001 | |
From: Maksym Veremeyenko <[email protected]> | |
Date: Wed, 4 Oct 2017 09:05:00 -0400 | |
Subject: [PATCH 5/5] Set frame interlaced if required but still progressive | |
--- | |
src/modules/avformat/consumer_avformat.c | 9 +++++++++ | |
1 file changed, 9 insertions(+) | |
diff --git a/src/modules/avformat/consumer_avformat.c b/src/modules/avformat/consumer_avformat.c | |
index b18b875..6992422 100644 | |
--- a/src/modules/avformat/consumer_avformat.c | |
+++ b/src/modules/avformat/consumer_avformat.c | |
@@ -1851,6 +1851,15 @@ static void *consumer_thread( void *arg ) | |
converted_avframe->quality = c->global_quality; | |
converted_avframe->pts = frame_count; | |
+ // set frame interlaced if required but still progressive | |
+ if ( mlt_properties_get_int( frame_properties, "progressive" ) && | |
+ !mlt_properties_get_int( consumer, "progressive" ) ) | |
+ { | |
+ mlt_properties_set_int( frame_properties, "progressive", 0 ); | |
+ mlt_properties_set_int( frame_properties, "top_field_first", | |
+ mlt_properties_get_int( consumer, "top_field_first" ) ); | |
+ } | |
+ | |
// Set frame interlace hints | |
converted_avframe->interlaced_frame = !mlt_properties_get_int( frame_properties, "progressive" ); | |
converted_avframe->top_field_first = mlt_properties_get_int( frame_properties, "top_field_first" ); | |
-- | |
1.8.3.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment