diff options
author | Mark Thompson <sw@jkqxz.net> | 2017-12-11 00:38:57 +0000 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2018-02-20 22:04:12 +0000 |
commit | 0e4c166cdd6446522a085dd9731967d09ac71f72 (patch) | |
tree | 0f2bf3b966ddad43142bc46331ba96adea499116 /libavcodec | |
parent | a3daecd6375279d9fdb863ac9db3545a33e97651 (diff) | |
download | ffmpeg-0e4c166cdd6446522a085dd9731967d09ac71f72.tar.gz |
cbs_h2645: Remove active ps references when it is replaced
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/cbs_h2645.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c index e3b5bf618a..9d05d59156 100644 --- a/libavcodec/cbs_h2645.c +++ b/libavcodec/cbs_h2645.c @@ -674,6 +674,8 @@ static int cbs_h26 ## h26n ## _replace_ ## ps_var(CodedBitstreamContext *ctx, \ " id : %d.\n", id); \ return AVERROR_INVALIDDATA; \ } \ + if (priv->ps_var[id] == priv->active_ ## ps_var) \ + priv->active_ ## ps_var = NULL ; \ av_freep(&priv->ps_var[id]); \ priv->ps_var[id] = av_malloc(sizeof(*ps_var)); \ if (!priv->ps_var[id]) \ |