diff mbox

[FFmpeg-devel,3/3] avformat/matroskadec: set AVCodecParameters.field_order on progressive video

Message ID 20160927180305.6132-3-jamrial@gmail.com
State Accepted
Commit 29b6c2be291eaa604a409daf7fd8cc4fb8a762cb
Headers show

Commit Message

James Almer Sept. 27, 2016, 6:03 p.m. UTC
Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavformat/matroskadec.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Michael Niedermayer Sept. 27, 2016, 11:26 p.m. UTC | #1
On Tue, Sep 27, 2016 at 03:03:05PM -0300, James Almer wrote:
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
>  libavformat/matroskadec.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> index 77b8a5d..2317024 100644
> --- a/libavformat/matroskadec.c
> +++ b/libavformat/matroskadec.c
> @@ -2279,6 +2279,8 @@ static int matroska_parse_tracks(AVFormatContext *s)
>  
>              if (track->video.interlaced == MATROSKA_VIDEO_INTERLACE_FLAG_INTERLACED)
>                  st->codecpar->field_order = mkv_field_order(track->video.field_order);
> +            else if (track->video.interlaced == MATROSKA_VIDEO_INTERLACE_FLAG_PROGRESSIVE)
> +                st->codecpar->field_order = AV_FIELD_PROGRESSIVE;

should be ok

thx

[...]
James Almer Sept. 27, 2016, 11:32 p.m. UTC | #2
On 9/27/2016 8:26 PM, Michael Niedermayer wrote:
> On Tue, Sep 27, 2016 at 03:03:05PM -0300, James Almer wrote:
>> Signed-off-by: James Almer <jamrial@gmail.com>
>> ---
>>  libavformat/matroskadec.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
>> index 77b8a5d..2317024 100644
>> --- a/libavformat/matroskadec.c
>> +++ b/libavformat/matroskadec.c
>> @@ -2279,6 +2279,8 @@ static int matroska_parse_tracks(AVFormatContext *s)
>>  
>>              if (track->video.interlaced == MATROSKA_VIDEO_INTERLACE_FLAG_INTERLACED)
>>                  st->codecpar->field_order = mkv_field_order(track->video.field_order);
>> +            else if (track->video.interlaced == MATROSKA_VIDEO_INTERLACE_FLAG_PROGRESSIVE)
>> +                st->codecpar->field_order = AV_FIELD_PROGRESSIVE;
> 
> should be ok
> 
> thx

Pushed, thanks.
diff mbox

Patch

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 77b8a5d..2317024 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2279,6 +2279,8 @@  static int matroska_parse_tracks(AVFormatContext *s)
 
             if (track->video.interlaced == MATROSKA_VIDEO_INTERLACE_FLAG_INTERLACED)
                 st->codecpar->field_order = mkv_field_order(track->video.field_order);
+            else if (track->video.interlaced == MATROSKA_VIDEO_INTERLACE_FLAG_PROGRESSIVE)
+                st->codecpar->field_order = AV_FIELD_PROGRESSIVE;
 
             if (track->video.stereo_mode && track->video.stereo_mode < MATROSKA_VIDEO_STEREOMODE_TYPE_NB)
                 mkv_stereo_mode_display_mul(track->video.stereo_mode, &display_width_mul, &display_height_mul);