media_info_s *_media = (media_info_s*)calloc(1, sizeof(media_info_s));
media_content_retvm_if(_media == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
- ret = _media_info_get_media_info_from_db(repl_path, DEFAULT_MEDIA_STORAGE_ID, (media_info_h)_media);
+ if (STRING_VALID(storage_id))
+ ret = _media_info_get_media_info_from_db(repl_path, storage_id, (media_info_h)_media);
+ else
+ ret = _media_info_get_media_info_from_db(repl_path, DEFAULT_MEDIA_STORAGE_ID, (media_info_h)_media);
*info = (media_info_h)_media;
return ret;