Commit c29d1db6 authored by hpi1's avatar hpi1

Simplify: removed dest_cl parameter from clpi_copy()

parent 5a478d55
......@@ -627,10 +627,14 @@ clpi_parse(char *path, int verbose)
}
CLPI_CL*
clpi_copy(CLPI_CL* dest_cl, CLPI_CL* src_cl)
clpi_copy(CLPI_CL* src_cl)
{
CLPI_CL* dest_cl = NULL;
int ii, jj;
if (dest_cl && src_cl) {
if (src_cl) {
dest_cl = (CLPI_CL*) calloc(1, sizeof(CLPI_CL));
dest_cl->clip.clip_stream_type = src_cl->clip.clip_stream_type;
dest_cl->clip.application_type = src_cl->clip.application_type;
dest_cl->clip.is_atc_delta = src_cl->clip.is_atc_delta;
......@@ -703,8 +707,7 @@ clpi_copy(CLPI_CL* dest_cl, CLPI_CL* src_cl)
dest_cl->cpi.entry[ii].fine[jj].spn_ep = src_cl->cpi.entry[ii].fine[jj].spn_ep;
}
}
return dest_cl;
}
clpi_free(dest_cl);
return NULL;
return dest_cl;
}
......@@ -28,7 +28,7 @@
BD_PRIVATE uint32_t clpi_lookup_spn(CLPI_CL *cl, uint32_t timestamp, int before, uint8_t stc_id);
BD_PRIVATE uint32_t clpi_access_point(CLPI_CL *cl, uint32_t pkt, int next, int angle_change, uint32_t *time);
BD_PRIVATE CLPI_CL* clpi_parse(char *path, int verbose);
BD_PRIVATE CLPI_CL* clpi_copy(CLPI_CL* dest_cl, CLPI_CL* src_cl);
BD_PRIVATE CLPI_CL* clpi_copy(CLPI_CL* src_cl);
BD_PRIVATE void clpi_free(CLPI_CL *cl);
#endif // _CLPI_PARSE_H_
......@@ -2284,12 +2284,9 @@ struct meta_dl *bd_get_meta(BLURAY *bd)
struct clpi_cl *bd_get_clpi(BLURAY *bd, unsigned clip_ref)
{
NAV_CLIP *clip;
if (bd->title && clip_ref < bd->title->clip_list.count) {
clip = &bd->title->clip_list.clip[clip_ref];
CLPI_CL *cl = (CLPI_CL*) calloc(1, sizeof(CLPI_CL));
return clpi_copy(cl, clip->cl);
NAV_CLIP *clip = &bd->title->clip_list.clip[clip_ref];
return clpi_copy(clip->cl);
}
return NULL;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment