Skip to content

Commit 5161b74

Browse files
Improve error messages
1 parent 07e2489 commit 5161b74

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/zm_netint_yolo.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ bool Quadra_Yolo::setup(AVStream *p_dec_stream, AVCodecContext *decoder_ctx, con
9797
int ret = ni_alloc_network_context(&network_ctx, use_hwframe,
9898
devid /*dev_id*/, 30 /* keep alive */, model_format, model_width, model_height, nbg_file.c_str());
9999
if (ret != 0) {
100-
Error("failed to allocate network context");
100+
Error("failed to allocate network context on card %d", devid);
101101
return false;
102102
}
103103
network_data = &network_ctx->network_data;
@@ -137,14 +137,14 @@ bool Quadra_Yolo::setup(AVStream *p_dec_stream, AVCodecContext *decoder_ctx, con
137137

138138
ret = ni_ai_packet_buffer_alloc(&frame->api_packet.data.packet, &network_ctx->network_data);
139139
if (ret != NI_RETCODE_SUCCESS) {
140-
Error( "failed to allocate packet");
140+
Error( "failed to allocate packet on card %d", devid);
141141
return false;
142142
}
143143
ret = ni_frame_buffer_alloc_hwenc(&frame->api_frame.data.frame,
144144
frame->scale_width,
145145
frame->scale_height, 0);
146146
if (ret != NI_RETCODE_SUCCESS) {
147-
Error("failed to allocate frame");
147+
Error("failed to allocate frame on card %d", devid);
148148
return false;
149149
}
150150

0 commit comments

Comments
 (0)