Backport of "av1parser, h265parser: Fix some code defects" into 1.22
requested to merge tpm/gstreamer:backport-mr-3953-into-1.22-fix_codecparsers_static_analysis into 1.22
Backport of !3953 (merged) "av1parser, h265parser: Fix some code defects".
Commits:
- b2fcc177 av1parser, h265parser: Fix some code defects