The existing queue initialization function would always sets it's maximum queue size to ctx->queue_size. But because we are introducing more queues we may want the sizes to differ between them. Move the specification of the queue size into an argument, which can be passed from the caller. This patch makes no functional change to the behavior. It is being made to accommodate Marton Balin's request to split out the queue size for the new VANC queue being introduced in a later patch.
Showing the changes to libavdevice/decklink_dec.cpp (1 of 3 files). Show all
Unified · Split
| @@ -1297,7 +1297,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) · 1296 unmodified lines | |||
| 1297 | goto error; | 1297 | goto error; |
| 1298 | } | 1298 | } |
| 1299 | 1299 | ||
| 1300 | ff_decklink_packet_queue_init(avctx, &ctx->queue); | 1300 | ff_decklink_packet_queue_init(avctx, &ctx->queue, cctx->queue_size); |
| 1301 | 1301 | ||
| 1302 | if (ctx->dli->StartStreams() != S_OK) { | 1302 | if (ctx->dli->StartStreams() != S_OK) { |
| 1303 | av_log(avctx, AV_LOG_ERROR, "Cannot start input stream\n"); | 1303 | av_log(avctx, AV_LOG_ERROR, "Cannot start input stream\n"); |