typedef struct _mc_gst_port_t mc_gst_port_t;
typedef struct _mc_gst_core_t mc_gst_core_t;
typedef struct _GstMCBuffer GstMCBuffer;
+typedef struct _ion_mmu_data_t ion_mmu_data_t;
typedef enum {
BUF_SHARE_METHOD_PADDR = 0,
} buf_share_method_t;
#ifdef TIZEN_PROFILE_LITE
-struct ion_mmu_data {
+struct _ion_mmu_data_t {
int master_id;
int fd_buffer;
unsigned long iova_addr;
int phy_addr = 0;
int phy_size = 0;
tbm_bo_handle handle_fd = tbm_bo_get_handle(mm_vbuffer->handle.bo[0], TBM_DEVICE_MM);
+ if (handle_fd == NULL) {
+ LOGE("Invaild bo handle");
+ return NULL;
+ }
+
if (__tbm_get_physical_addr_bo(handle_fd, &phy_addr, &phy_size) == 0) {
mm_vbuffer->handle.paddr[0] = (void *)phy_addr;
LOGD("mm_vbuffer->paddr : %p", mm_vbuffer->handle.paddr[0]);
int open_flags = O_RDWR;
int ion_fd = -1;
- struct ion_mmu_data mmu_data;
+ ion_mmu_data_t mmu_data;
struct ion_custom_data custom_data;
- memset(&mmu_data, 0x0, sizeof(ion_mmu_data));
- memset(&custom_data, 0x0, sizeof(ion_custom_data));
+ memset(&mmu_data, 0x0, sizeof(ion_mmu_data_t));
mmu_data.fd_buffer = handle_bo.u32;
custom_data.cmd = 4;
return;
} else {
layer = 4 - ((header >> 17) & 0x3);
-
- if (layer < 1) {
- *have_frame = FALSE;
- return;
- }
}
/* if it's an invalid bitrate */
read_size = readsize;
app->offset += header_size + readsize;
+ if (app->offset > app->length) {
+ read_size = 0;
+ *have_frame = FALSE;
+ g_print("[FAIL] offset error \n");
+ return;
+ }
+
} else {
read_size = 0;
g_print("[FAIL] Not found aac frame sync. \n");
{
app->frame = atoi(cmd);
- if (app->frame > 0)
+ if (app->frame > 0 && app->frame < 10)
_mediacodec_process_input(app);
reset_menu_state();
}