[mpi_dec_test]: get_frame until return MppFrame is NULL

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@931 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ChenHengming
2016-06-16 11:51:56 +00:00
parent c31e7ada4a
commit f7341152cb

View File

@@ -163,23 +163,27 @@ int mpi_dec_test(MpiDecTestCmd *cmd)
msleep(50);
ret = mpi->decode_get_frame(ctx, &frame);
if (MPP_OK != ret) {
mpp_err("decode_get_frame failed ret %d\n", ret);
goto MPP_TEST_OUT;
}
if (frame) {
if (mpp_frame_get_info_change(frame)) {
mpp_log("decode_get_frame get info changed found\n");
mpi->control(ctx, MPP_CODEC_SET_INFO_CHANGE_READY, NULL);
} else {
mpp_log("decode_get_frame get frame %d\n", frame_count++);
if (fp_output)
dump_mpp_frame_to_file(frame, fp_output);
do {
ret = mpi->decode_get_frame(ctx, &frame);
if (MPP_OK != ret) {
mpp_err("decode_get_frame failed ret %d\n", ret);
goto MPP_TEST_OUT;
}
mpp_frame_deinit(&frame);
}
if (frame) {
if (mpp_frame_get_info_change(frame)) {
mpp_log("decode_get_frame get info changed found\n");
mpi->control(ctx, MPP_CODEC_SET_INFO_CHANGE_READY, NULL);
} else {
mpp_log("decode_get_frame get frame %d\n", frame_count++);
if (fp_output)
dump_mpp_frame_to_file(frame, fp_output);
}
mpp_frame_deinit(&frame);
} else {
break;
}
} while (1);
}
ret = mpi->reset(ctx);