mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-05 01:02:39 +08:00
judge whether the dequeued task is NULL in mpi_enc_test
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1040 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
@@ -182,11 +182,19 @@ int mpi_enc_test(MpiEncTestCmd *cmd)
|
||||
|
||||
mpp_packet_init_with_buffer(&packet, pkt_buf_out);
|
||||
|
||||
do {
|
||||
ret = mpi->dequeue(ctx, MPP_PORT_INPUT, &task);
|
||||
if (ret) {
|
||||
mpp_err("mpp task input dequeue failed\n");
|
||||
goto MPP_TEST_OUT;
|
||||
}
|
||||
if (task == NULL) {
|
||||
mpp_log("mpi dequeue from MPP_PORT_INPUT fail, task equal with NULL!");
|
||||
usleep(3000);
|
||||
} else
|
||||
break;
|
||||
} while (1);
|
||||
|
||||
|
||||
mpp_task_meta_set_frame (task, MPP_META_KEY_INPUT_FRM, frame);
|
||||
mpp_task_meta_set_packet(task, MPP_META_KEY_OUTPUT_PKT, packet);
|
||||
|
Reference in New Issue
Block a user