mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
avcodec/hevc/sei: don't attempt to use stale values in HEVCSEITDRDI
Invalidate the whole struct on SEI reset. Signed-off-by: James Almer <jamrial@gmail.com> (cherry picked from commit 8e01bff774aeacdeb8cc9fb5a6fe8c958bdfa704)
This commit is contained in:
parent
046a8293e1
commit
dd00a614e1
3 changed files with 5 additions and 1 deletions
|
|
@ -4106,7 +4106,7 @@ static int hevc_sei_to_context(AVCodecContext *avctx, HEVCSEI *sei)
|
|||
{
|
||||
int ret;
|
||||
|
||||
if (sei->tdrdi.num_ref_displays) {
|
||||
if (sei->tdrdi.present) {
|
||||
AVBufferRef *buf;
|
||||
size_t size;
|
||||
AV3DReferenceDisplaysInfo *tdrdi = av_tdrdi_alloc(sei->tdrdi.num_ref_displays, &size);
|
||||
|
|
|
|||
|
|
@ -217,6 +217,8 @@ static int decode_nal_sei_3d_reference_displays_info(HEVCSEITDRDI *s, GetBitCont
|
|||
}
|
||||
s->three_dimensional_reference_displays_extension_flag = get_bits1(gb);
|
||||
|
||||
s->present = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ typedef struct HEVCSEITDRDI {
|
|||
uint8_t additional_shift_present_flag[32];
|
||||
int16_t num_sample_shift[32];
|
||||
uint8_t three_dimensional_reference_displays_extension_flag;
|
||||
int present;
|
||||
} HEVCSEITDRDI;
|
||||
|
||||
typedef struct HEVCSEIRecoveryPoint {
|
||||
|
|
@ -126,6 +127,7 @@ int ff_hevc_decode_nal_sei(GetBitContext *gb, void *logctx, HEVCSEI *s,
|
|||
*/
|
||||
static inline void ff_hevc_reset_sei(HEVCSEI *sei)
|
||||
{
|
||||
sei->tdrdi.present = 0;
|
||||
ff_h2645_sei_reset(&sei->common);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue