has_b_frames used in decoder for size of the frame reordering buffer, and we don't used the max_b_frames in decoder.
Unified · Split
| @@ -170,14 +170,12 @@ static int export_stream_params(const XevdContext *xectx, AVCodecContext *avctx) · 169 unmodified lines | ||
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | // the function returns sps->num_reorder_pics |
| 173 | − ret = xevd_config(xectx->id, XEVD_CFG_GET_MAX_CODING_DELAY, &avctx->max_b_frames, &size); | |
| 173 | + ret = xevd_config(xectx->id, XEVD_CFG_GET_MAX_CODING_DELAY, &avctx->has_b_frames, &size); | |
| 174 | 174 | if (XEVD_FAILED(ret)) { |
| 175 | 175 | av_log(avctx, AV_LOG_ERROR, "Failed to get max_coding_delay\n"); |
| 176 | 176 | return AVERROR_EXTERNAL; |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | − avctx->has_b_frames = (avctx->max_b_frames) ? 1 : 0; | |
| 180 | − | |
| 181 | 179 | return 0; |
| 182 | 180 | } |
| 183 | 181 | |