[FFmpeg-trac] #5514(avcodec:open): Interlaced HEVC Steam not Decoded Properly

FFmpeg trac at avcodec.org
Thu Dec 17 23:41:27 EET 2020


#5514: Interlaced HEVC Steam not Decoded Properly
-------------------------------------+-----------------------------------
             Reporter:  jlsantiago0  |                    Owner:
                 Type:  defect       |                   Status:  open
             Priority:  normal       |                Component:  avcodec
              Version:  git-master   |               Resolution:
             Keywords:  hevc         |               Blocked By:
             Blocking:               |  Reproduced by developer:  1
Analyzed by developer:  0            |
-------------------------------------+-----------------------------------

Comment (by tmm1):

 This makes ffprobe report the correct height, but does not help with
 playback at all.

 {{{
 diff --git a/libavcodec/hevc_parser.c b/libavcodec/hevc_parser.c
 index b444b99955..d00093d592 100644
 --- a/libavcodec/hevc_parser.c
 +++ b/libavcodec/hevc_parser.c
 @@ -105,6 +105,10 @@ static int
 hevc_parse_slice_header(AVCodecParserContext *s, H2645NAL *nal,
          den = ps->sps->vui.vui_time_scale;
      }

 +    if (ps->sps->ptl.general_ptl.interlaced_source_flag) {
 +        avctx->height = s->height * 2;
 +    }
 +
      if (num != 0 && den != 0)
          av_reduce(&avctx->framerate.den, &avctx->framerate.num,
                    num, den, 1 << 30);
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/5514#comment:12>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list