* commit '0e4c166cdd6446522a085dd9731967d09ac71f72': cbs_h2645: Remove active ps references when it is replaced
Unified · Split
| @@ -674,6 +674,8 @@ static int cbs_h26 ## h26n ## _replace_ ## ps_var(CodedBitstreamContext *ctx, \ · 673 unmodified lines | ||
| 674 | 674 | " id : %d.\n", id); \ |
| 675 | 675 | return AVERROR_INVALIDDATA; \ |
| 676 | 676 | } \ |
| 677 | + if (priv->ps_var[id] == priv->active_ ## ps_var) \ | |
| 678 | + priv->active_ ## ps_var = NULL ; \ | |
| 677 | 679 | av_freep(&priv->ps_var[id]); \ |
| 678 | 680 | priv->ps_var[id] = av_malloc(sizeof(*ps_var)); \ |
| 679 | 681 | if (!priv->ps_var[id]) \ |