aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h263_parser.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-04-09 09:55:55 +0200
committerAnton Khirnov <anton@khirnov.net>2023-04-13 15:34:07 +0200
commit5d407cb2d71176240487171bb0e803c3d2e36f15 (patch)
treebd90f5ae127f86bc91d255d9123bcfbaaa53472d /libavcodec/h263_parser.c
parent380db569287ba99d903b7629f209b9adc7fd2723 (diff)
downloadffmpeg-5d407cb2d71176240487171bb0e803c3d2e36f15.tar.gz
fftools/ffmpeg: change video decoding timestamp generation
When no timestamps are available from the container, the video decoding code will currently use fake dts values - generated in process_input_packet() based on a combination of information from the decoder and the parser (obtained via the demuxer) - to generate timestamps during decoder flushing. This is fragile, hard to follow, and unnecessarily convoluted, since more reliable information can be obtained directly from post-decoding values. The new code keeps track of the last decoded frame pts and estimates its duration based on a number of heuristics. Timestamps generated when both pts and pkt_dts are missing are then simple pts+duration of the last frame. The heuristics are somewhat complicated by the fact that lavf insists on making up packet timestamps based on its highly incomplete information. That should be removed in the future, allowing to further simplify this code. The results of the following tests change: * h264-3386 now requires -fps_mode passthrough to avoid dropping frames at the end; this is a pathology of the interaction of the new and old code, and the fact that the sample switches from field to frame coding in the last packet, and will be fixed in following commits * hevc-conformance-DELTAQP_A_BRCM_4 stops inventing an arbitrary timestamp gap at the end * hevc-small422chroma - the single frame output by this test now has a timestamp of 0, rather than an arbitrary 7
Diffstat (limited to 'libavcodec/h263_parser.c')
0 files changed, 0 insertions, 0 deletions