[mpp]: change packet/frame deinit function and always return ok for function get_frame/get_packet

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@160 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ChenHengming
2015-08-25 08:14:44 +00:00
parent 005d6da4fc
commit f5c7532965
7 changed files with 33 additions and 51 deletions

View File

@@ -96,13 +96,12 @@ int main()
// TODO: diaplay function called here
mpp_frame_deinit(dec_out);
mpp_frame_deinit(&dec_out);
dec_out = next;
} while (dec_out);
}
mpp_packet_deinit(dec_in);
dec_in = NULL;
mpp_packet_deinit(&dec_in);
}
// interface with input and output separated
@@ -116,8 +115,7 @@ int main()
goto MPP_TEST_FAILED;
}
mpp_packet_deinit(dec_in);
dec_in = NULL;
mpp_packet_deinit(&dec_in);
}
for (i = 0; i < MPI_DEC_LOOP_COUNT; i++) {
@@ -133,7 +131,7 @@ int main()
// TODO: diaplay function called here
mpp_frame_deinit(dec_out);
mpp_frame_deinit(&dec_out);
dec_out = next;
} while (dec_out);
}
@@ -183,13 +181,10 @@ int main()
goto MPP_TEST_FAILED;
}
if (enc_out) {
mpp_packet_deinit(enc_out);
enc_out = NULL;
}
if (enc_out)
mpp_packet_deinit(&enc_out);
mpp_frame_deinit(enc_in);
enc_in = NULL;
mpp_frame_deinit(&enc_in);
}
// interface with input and output separated
@@ -203,8 +198,7 @@ int main()
goto MPP_TEST_FAILED;
}
mpp_frame_deinit(enc_in);
enc_in = NULL;
mpp_frame_deinit(&enc_in);
}
for (i = 0; i < MPI_ENC_LOOP_COUNT; i++) {
@@ -214,10 +208,7 @@ int main()
}
if (enc_out) {
if (enc_out) {
mpp_packet_deinit(enc_out);
enc_out = NULL;
}
mpp_packet_deinit(&enc_out);
}
}
@@ -228,15 +219,11 @@ int main()
goto MPP_TEST_FAILED;
}
if (dec_in) {
mpp_packet_deinit(dec_in);
dec_in = NULL;
}
if (dec_in)
mpp_packet_deinit(&dec_in);
if (enc_in) {
mpp_frame_deinit(enc_in);
enc_in = NULL;
}
if (enc_in)
mpp_frame_deinit(&enc_in);
mpp_deinit(ctx);
free(buf);
@@ -246,15 +233,11 @@ int main()
return 0;
MPP_TEST_FAILED:
if (dec_in) {
mpp_packet_deinit(dec_in);
dec_in = NULL;
}
if (dec_in)
mpp_packet_deinit(&dec_in);
if (enc_in) {
mpp_frame_deinit(enc_in);
enc_in = NULL;
}
if (enc_in)
mpp_frame_deinit(&enc_in);
if (ctx)
mpp_deinit(ctx);