[mythtv-commits] [MythTV/mythtv] 2af1c2: DTVRecorder::FindMPEG2Keyframes: fix frame countin...

Scott Theisen noreply at github.com
Thu Nov 24 16:14:00 UTC 2022

  Branch: refs/heads/fixes/32
  Home:   https://github.com/MythTV/mythtv
  Commit: 2af1c2064ecc314e681a39937fe9eb06be048b5f
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-11-24 (Thu, 24 Nov 2022)

  Changed paths:
    M mythtv/libs/libmythtv/recorders/dtvrecorder.cpp

  Log Message:
  DTVRecorder::FindMPEG2Keyframes: fix frame counting with field pictures

refs: https://github.com/MythTV/mythtv/issues/548

ITU-T Rec. H.262 (2000 E)
§6.1.1 Video sequence,
§6.2.2 Video Sequence, and
§6.3.10 Picture Coding Extension
and Table 6-14 Meaning of picture_structure.

When an interlaced stream is encoded with each coded frame
consisting of two field pictures, the picture_header() (and its
start code) appear twice per frame.  This causes the duration
estimate to be twice what is should be by double counting frames.

To fix this use the immediately following picture_coding_extension()
for non-progressive sequences and only count a new frame at the
first field to be presented instead of incorrectly counting each
field picture as its own frame.

(cherry picked from commit 2f2b7022b0dc8dcb322d25637b603f4679fdd387)

More information about the mythtv-commits mailing list