ff_decode_frame_props() injects global side data passed by the caller (Usually coming from the container) but ignores the global side data the decoder gathered from the bitstream itself. This commit amends this.
Unified · Split
| @@ -1570,6 +1570,15 @@ int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame) · 1569 unmodified lines | |||
| 1570 | if (ret < 0) | 1570 | if (ret < 0) |
| 1571 | return ret; | 1571 | return ret; |
| 1572 | 1572 | ||
| 1573 | for (int i = 0; i < avctx->nb_decoded_side_data; i++) { | ||
| 1574 | const AVFrameSideData *src = avctx->decoded_side_data[i]; | ||
| 1575 | if (av_frame_get_side_data(frame, src->type)) | ||
| 1576 | continue; | ||
| 1577 | ret = av_frame_side_data_clone(&frame->side_data, &frame->nb_side_data, src, 0); | ||
| 1578 | if (ret < 0) | ||
| 1579 | return ret; | ||
| 1580 | } | ||
| 1581 | |||
| 1573 | if (!(ffcodec(avctx->codec)->caps_internal & FF_CODEC_CAP_SETS_FRAME_PROPS)) { | 1582 | if (!(ffcodec(avctx->codec)->caps_internal & FF_CODEC_CAP_SETS_FRAME_PROPS)) { |
| 1574 | const AVPacket *pkt = avctx->internal->last_pkt_props; | 1583 | const AVPacket *pkt = avctx->internal->last_pkt_props; |
| 1575 | 1584 | ||