BSF can update extradata, e.g., vvc_mp4toannexb. If we don't copy bsf->par_out back to avcodec context, decoder can get extradata in mp4 format, while packets are in annexb format.
Unified · Split
| @@ -202,6 +202,9 @@ static int decode_bsfs_init(AVCodecContext *avctx) · 201 unmodified lines | |||
| 202 | goto fail; | 202 | goto fail; |
| 203 | 203 | ||
| 204 | ret = av_bsf_init(avci->bsf); | 204 | ret = av_bsf_init(avci->bsf); |
| 205 | if (ret < 0) | ||
| 206 | goto fail; | ||
| 207 | ret = avcodec_parameters_to_context(avctx, avci->bsf->par_out); | ||
| 205 | if (ret < 0) | 208 | if (ret < 0) |
| 206 | goto fail; | 209 | goto fail; |
| 207 | 210 | ||