Opened 5 years ago
Closed 5 years ago
#9283 closed defect (fixed)
key_frame flag not set in AVFrame using cuviddec on interlaced h264
| Reported by: | stuhlo | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | avcodec |
| Version: | unspecified | Keywords: | cuvid |
| Cc: | stuhlo | Blocked By: | |
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
Summary of the bug:
Using cuviddec through ffmpeg API, decoded frames never contain flag key_frame set.
The problem occurs when decoding interlaced input where each field is stored in a separate packet. A pair of fields is decoded as a single frame. In the function cuvid_handle_picture_decode, the last seen key frame is marked in the array ctx->key_frame according to picparams->CurrPicIdx. If two subsequent fields represent a single decoded frame (i.e. they share CurrPicIdx) and only the first one is entirely intra -coded (i.e. it is a key frame), handling the second field in the function cuvid_handle_picture_decode overwrites the key_frame flag before it can be read in the function cuvid_output_frame.
Attachments (1)
Change History (4)
by , 5 years ago
| Attachment: | ffmpeg-cuvid-keyframe-fix.patch added |
|---|
follow-up: 2 comment:1 by , 5 years ago
| Analyzed by developer: | unset |
|---|---|
| Keywords: | nvdec avc h264 removed |
| Reproduced by developer: | unset |
| Version: | 4.3.2 → unspecified |
Patches (and patch suggestions) are unfortunately ignored here, please send your patch to the FFmpeg mailing list.
comment:2 by , 5 years ago
Replying to Carl Eugen Hoyos:
Patches (and patch suggestions) are unfortunately ignored here, please send your patch to the FFmpeg mailing list.
I sent it. Thx.
comment:3 by , 5 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Patch is applied. a501d559050f395f22153a7954b193feb18325e4



patch for the bug