mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
hevc: do not change the VPS if its contents are the same
This is the same as is done for SPS.
This commit is contained in:
parent
7693ba0a0e
commit
ce0bc09ee2
1 changed files with 8 additions and 2 deletions
|
|
@ -407,8 +407,14 @@ int ff_hevc_decode_nal_vps(HEVCContext *s)
|
|||
}
|
||||
get_bits1(gb); /* vps_extension_flag */
|
||||
|
||||
av_buffer_unref(&s->vps_list[vps_id]);
|
||||
s->vps_list[vps_id] = vps_buf;
|
||||
if (s->vps_list[vps_id] &&
|
||||
!memcmp(s->vps_list[vps_id]->data, vps_buf->data, vps_buf->size)) {
|
||||
av_buffer_unref(&vps_buf);
|
||||
} else {
|
||||
av_buffer_unref(&s->vps_list[vps_id]);
|
||||
s->vps_list[vps_id] = vps_buf;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue