if(nRet != MEDIA_PACKET_ERROR_NONE)
{
FPRINTF("[Line : %d][%s] media_format_get_audio_info failed.\n", __LINE__, API_NAMESPACE);
+ media_format_unref(hMediaFormat);
return;
}
if(nRet != MEDIA_PACKET_ERROR_NONE)
{
FPRINTF("[Line : %d][%s] media_format_get_audio_channel_mask failed.\n", __LINE__, API_NAMESPACE);
+ media_format_unref(hMediaFormat);
return;
}
+ media_format_unref(hMediaFormat);
+
if (tMask == 0) {
tMask = tChannelMask;
}
nRet = media_format_unref(hMediaFormat);
PRINT_RESULT(MEDIA_FORMAT_ERROR_NONE, nRet, "media_format_unref", MediaFormatGetError(nRet));
+ hMediaFormat = NULL;
nRet = player_prepare(g_player);
PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_prepare", PlayerGetError(nRet));
if (!g_bPlayerAudioDecodedCallback)
{
FPRINTF("[Line : %d][%s] player_audio_decoded_cb failed, error returned = callback not invoked\n", __LINE__, API_NAMESPACE);
- media_format_unref(hMediaFormat);
player_stop(g_player);
player_unprepare(g_player);
return 1;
nRet = media_format_unref(hMediaFormat);
PRINT_RESULT(MEDIA_FORMAT_ERROR_NONE, nRet, "media_format_unref", MediaFormatGetError(nRet));
+ hMediaFormat = NULL;
nRet = player_prepare(g_player);
PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_prepare", PlayerGetError(nRet));
if (!g_bPlayerAudioDecodedCallback)
{
FPRINTF("[Line : %d][%s] player_audio_decoded_cb failed, error returned = callback not invoked\n", __LINE__, API_NAMESPACE);
- media_format_unref(hMediaFormat);
player_stop(g_player);
player_unprepare(g_player);
return 1;
nRet = media_format_unref(hMediaFormat);
PRINT_RESULT(MEDIA_FORMAT_ERROR_NONE, nRet, "media_format_unref", MediaFormatGetError(nRet));
+ hMediaFormat = NULL;
nRet = player_prepare(g_player);
PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_prepare", PlayerGetError(nRet));
if (!g_bPlayerAudioDecodedCallback)
{
FPRINTF("[Line : %d][%s] player_audio_decoded_cb failed, error returned = callback not invoked\n", __LINE__, API_NAMESPACE);
- media_format_unref(hMediaFormat);
player_stop(g_player);
player_unprepare(g_player);
return 1;
nRet = media_format_unref(hMediaFormat);
PRINT_RESULT(MEDIA_FORMAT_ERROR_NONE, nRet, "media_format_unref", MediaFormatGetError(nRet));
+ hMediaFormat = NULL;
nRet = player_prepare(g_player);
PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_prepare", PlayerGetError(nRet));
if (!g_bPlayerAudioDecodedCallback)
{
FPRINTF("[Line : %d][%s] player_audio_decoded_cb failed, error returned = callback not invoked\n", __LINE__, API_NAMESPACE);
- media_format_unref(hMediaFormat);
player_stop(g_player);
player_unprepare(g_player);
return 1;
nRet = media_format_unref(hMediaFormat);
PRINT_RESULT(MEDIA_FORMAT_ERROR_NONE, nRet, "media_format_unref", MediaFormatGetError(nRet));
+ hMediaFormat = NULL;
nRet = player_prepare(g_player);
PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_prepare", PlayerGetError(nRet));
if (!g_bPlayerAudioDecodedCallback)
{
FPRINTF("[Line : %d][%s] player_audio_decoded_cb failed, error returned = callback not invoked\n", __LINE__, API_NAMESPACE);
- media_format_unref(hMediaFormat);
player_stop(g_player);
player_unprepare(g_player);
return 1;
nRet = media_format_unref(hMediaFormat);
PRINT_RESULT(MEDIA_FORMAT_ERROR_NONE, nRet, "media_format_unref", MediaFormatGetError(nRet));
+ hMediaFormat = NULL;
nRet = player_prepare(g_player);
PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_prepare", PlayerGetError(nRet));
if (!g_bPlayerAudioDecodedCallback)
{
FPRINTF("[Line : %d][%s] player_audio_decoded_cb failed, error returned = callback not invoked\n", __LINE__, API_NAMESPACE);
- media_format_unref(hMediaFormat);
player_stop(g_player);
player_unprepare(g_player);
return 1;
nRet = media_format_unref(hMediaFormat);
PRINT_RESULT(MEDIA_FORMAT_ERROR_NONE, nRet, "media_format_unref", MediaFormatGetError(nRet));
+ hMediaFormat = NULL;
nRet = player_prepare(g_player);
PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_prepare", PlayerGetError(nRet));
if (!g_bPlayerAudioDecodedCallback)
{
FPRINTF("[Line : %d][%s] player_audio_decoded_cb failed, error returned = callback not invoked\n", __LINE__, API_NAMESPACE);
- media_format_unref(hMediaFormat);
player_stop(g_player);
player_unprepare(g_player);
return 1;
nRet = media_format_unref(hMediaFormat);
PRINT_RESULT(MEDIA_FORMAT_ERROR_NONE, nRet, "media_format_unref", MediaFormatGetError(nRet));
+ hMediaFormat = NULL;
nRet = player_prepare(g_player);
PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_prepare", PlayerGetError(nRet));
if (!g_bPlayerAudioDecodedCallback)
{
FPRINTF("[Line : %d][%s] player_audio_decoded_cb failed, error returned = callback not invoked\n", __LINE__, API_NAMESPACE);
- media_format_unref(hMediaFormat);
player_stop(g_player);
player_unprepare(g_player);
return 1;
nRet = media_format_unref(hMediaFormat);
PRINT_RESULT(MEDIA_FORMAT_ERROR_NONE, nRet, "media_format_unref", MediaFormatGetError(nRet));
+ hMediaFormat = NULL;
nRet = player_prepare(g_player);
PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_prepare", PlayerGetError(nRet));
nRet = player_start(g_player);
PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_start", PlayerGetError(nRet));
- for(nRepeat = 0; nRepeat < LIMIT; nRepeat++) {
+ for (nRepeat = 0; nRepeat < LIMIT; nRepeat++) {
PlayerWaitForAsync2(TIMEOUT2);
- if(g_bPlayerAudioDecodedCallback)
+ if (g_bPlayerAudioDecodedCallback)
break;
}
if (!g_bPlayerAudioDecodedCallback)
{
FPRINTF("[Line : %d][%s] player_audio_decoded_cb failed, error returned = callback not invoked\n", __LINE__, API_NAMESPACE);
- media_format_unref(hMediaFormat);
player_stop(g_player);
player_unprepare(g_player);
return 1;
nRet = media_format_unref(hMediaFormat);
PRINT_RESULT(MEDIA_FORMAT_ERROR_NONE, nRet, "media_format_unref", MediaFormatGetError(nRet));
+ hMediaFormat = NULL;
nRet = player_prepare(g_player);
PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_prepare", PlayerGetError(nRet));
if (!g_bPlayerAudioDecodedCallback)
{
FPRINTF("[Line : %d][%s] player_audio_decoded_cb failed, error returned = callback not invoked\n", __LINE__, API_NAMESPACE);
- media_format_unref(hMediaFormat);
player_stop(g_player);
player_unprepare(g_player);
return 1;